8 ms·
I don't want to start a flame war; I don't consider myself a die hard vim user: What are reasons why I should switch to Sublime Text 2?
by frewsxcv 14y ago
I don't want to start a flame war; I don't consider myself a die hard vim user: What are reasons why I should switch to Sublime Text 2?
- grimgrin 14y agoIf you're not a die hard vim user but do enjoy vim navigation/insertion styles then you may want to try out Sublime's Vintage mode: http://www.sublimetext.com/docs/2/vintage.html http://www.sublimetext.com/docs/2/vintage.html
- JonnieCache 14y agoYou can find the dev branch of the vintage plugin here: https://github.com/sublimehq/Vintage https://github.com/sublimehq/Vintage Also see https://github.com/SublimeText/VintageEx https://github.com/SublimeText/VintageEx which adds the vim command line.
- ieatshortppl 14y agoUh, I'm in the same boat as the person you responded to and I am still confused. What are the advantages of sublime over vim (rather than ways that Sublime can emulate vim)?
- notJim 14y agoI tried this after learning vim, and it seemed to suffer from an uncanny valley problem. Once you get into the flow of things, you'll start treating it like vim, and then when something suddenly behaves slightly different or doesn't work at all, it's very disruptive. I can't think of a specific example right now unfortunately, as that was a while ago, but it happened regularly.
- nshankar 14y agoIt does not support Vim's wonderful vit, vat tools. Perhaps none supports like Vim. My fav for HTML/div editing.
- notJim 14y agoI switched to vim a year ago, and I fucking love it. The one thing I miss from ST2 is column editing/multiple cursors. Column editing fulfills the same kind of need as basic usage of vim macros, I think (i.e., applying some kind of sequence of edits to multiple rows), but it's visual and you get instant feedback (across all rows), which makes it easier and something you can sort of feel out iteratively. For example, supposed I have a row like (making up these names as I go, and suppose the list is longer): Controller_Section House_Model Person_To_Category_Selector and I want to insert after the first underscore the word class, so I'd get Controller_Class_Section and so on (this is a contrived example, but one has to do these kinds of things sometimes.) In vim, I think I'd record a macro, but I'd probably forget some parts (like moving to the next line at the end) and have to undo and whatnot (could use a regex too, but that's a bit harder--I'm practicing recently to be able to do it more effortlessly.) In ST2, what you do first is create a cursor at the beginning of each row (option + down arrow on OS X.) Then you move ahead one word (Opt + Right arrow on OS X.) Now the cursor is right before the underscore, even though the underscore is in a different position on each row. You can see that it's in the right place on each row, so it's hard to make a mistake, and if you need to do something more complicated, that remains true. Then, you just type _Class, and it types live on each row, once again making it so you get instant feedback, and it's hard to make a mistake. That to me is the biggest actual advantage of ST2 over VIM, but there are other reason to not switch, like vim's steeper learning curve (when most of us are already busy, and learning other stuff at the same time), and the fact that some people prefer the mouse, which behaves strangely in vim.
- groovy2shoes 14y agoMultiple cursors sound cool! In vim, you can do something more limited by using visual block mode (C-v) to insert on multiple lines, but you're restricted to insertion on the same column. The perhaps the closest thing I can think of for your example would be this (starting in normal mode with the cursor at the beginning of your list): f_i_Class<Esc>+;.+;. ("Move forward to the next '_', enter insert mode, insert '_Class', leave insert mode, move down one line to the first non-blank character, repeat the forward motion, repeat the insertion, repeat forward motion, repeat insertion." Vim does have word motions, but it includes underscores as parts of words.) Edit - formatting and a clarification that it's the closest I can think of (I'm doubtful it's the closest you can get).
- roryokane 14y agoI use Sublime Text 2 for its GUI powers: proportional-width fonts (I use Verdana), the code minimap, and the pretty file-browser sidebar with easy-to-click disclosure triangles. I also like that it’s easier to remember most Sublime Text 2 commands – the Command Palette (⇧⌘P) lets you fuzzy search all commands. So you can search for “syntru” and find the option “Set Syntax: Ruby” instead of having to remember Vim’s “:setf ruby”. Finally, I use Expand Selection to Word (⌘D) to quickly select multiple instances of a variable whose name I want to change – it’s slightly more convenient than it would be in Vim. On the other hand, I miss Vim’s editing model. It’s a lot more cumbersome to edit line-wise or move the cursor with Sublime Text’s keyboard shortcuts. And Sublime Text’s “Vintage” Vim emulation mode is a poor substitute. As another commenter said, Vintage is in the uncanny valley. Every now and then you run into a Vim command that just doesn’t work and it breaks your flow. For example, Escape is overloaded as both “go from Insert mode to Normal mode” and “collapse multiple carets into one”, and I never remember which it will do when I have a multiple selection in Insert mode.
- deleted 14y ago[deleted]
- nshankar 14y agoNo reasons really. I have found Vim better at tweaking. None can match that.
- grayrest 14y agoI've been in the process of switching from Vim to ST2 for a couple months (custom plugins in both, not in a hurry) and the main reason for doing it is because Python and the extension API are MUCH better than the Vim equivalents. If you don't do custom plugins, it really doesn't matter. Part of the reason for the delay is the lack of equivalent Vim workflows in Vintage. This has been improving a lot thanks to the people working on Vintage and at this point the only holes in my set are c-i/c-o and surround.vim shortcuts. I had to re-train myself to go from Esc to ctrl-[ since Esc conflicts heavily in ST2 but I've been meaning to do that for years in Vim anyway so I consider that a benefit.