4 ms·
I learned ST2 from my coworkers, who were all using it. Now I'm learning vim much the same way. I've switched to vim fulltime from ST2, and here are the feature
by notJim 14y ago
I learned ST2 from my coworkers, who were all using it. Now I'm learning vim much the same way. I've switched to vim fulltime from ST2, and here are the features of ST2 that I miss:
1. Multiple cursors. This is the only reason I ever use ST2 now. They're sort of like vim's visual block mode, except on steroids. For example, if you have multiple cursors, you can start typing and each cursor will behave as in insert point. Each cursor can also move independently, which means you can do things like moving word-wise or line-wise over lines which are not heterogeneous. Using Cmd + D, you can add selections, and then they're multiple cursors. This ends up replacing things like find-replace for me, because it's so fast and easy.
I should make a video of me using multiple cursors, because I feel I'm not explaining it well at all.
2. Cmd+p/goto-anything. Suppose I want to go to the getUser method of the auth class. All I have to do is hit Cmd + p, then type “Au@getUser”. As I type, a window appears with filenames, so first I type, “Au”, and then seeing that “Auth.php” is at the top, I type an @, which tells ST2 I'm now looking for a method, it then starts searching for methods within Auth.php.
Now, with vim I use Cmd-T, but that only gets me to the file, and it's kind of a bitch to get it working. It also has a thing to navigate methods, but I have to use something called tags, which means a) I have to figure out what the hell that is and b) I have to fiddle with getting it all setup. All that time could be spent programming. Mmmm, programming. I understand ctrlp makes some of this better, but I haven't tried it yet.
3. Better platform integration. With vim, there's a bunch of weird shit I have to do to get the clipboard working properly (including recompiling vim o_O), and the mouse seems janky. I mostly never use the mouse anyway, but the clipboard issues are annoying.
4. Python API vs vimscript. I wrote a couple of small plugins for ST2, which was nice and easy, because everybody knows python, and the API is modern and well thought out. With vim, I feel like it's a whole different matter, starting with learning a new programming language.
- heretohelp 14y ago>It also has a thing to navigate methods, but I have to use something called tags, which means a) I have to figure out what the hell that is Well. I'm not exactly old, but seeing someone say that about tags has made me feel rather ancient. There are better ways to navigate code than tags. For Emacs, for example, my setup uses Rope to navigate Python code.
- notJim 14y agoIt doesn't seem like the main issue is age as much as that most people will be coming to VIM from either IDEs or editors that had built-in code-navigation features, so moving to something like vim involves the extra overhead of learning things like tags or rope even.
- heretohelp 14y agoThere's definitely an age-gap here. People who grew up coding C had to learn to use ctags, whereas, people who start out in interpreted languages are much less likely to encounter such. >involves the extra overhead of learning things like tags or rope even. Rope has no learning overhead. It works the same as any IDE. You use the functionality it provides like "go-to definition" or refactoring. Tags are just a file you generate using a command and the editor uses it to provide a "go-to definition" faculty.
- notJim 14y agoJeeze, I don't know why this got acrimonious all of a sudden. That seems unnecessary. If I've insulted you in some way, then I apologize.
- heretohelp 14y agoNo insult intended or perceived. Edited my comment to better reflect the content and mood I wanted to convey. Thanks for the feedback.
- notJim 14y agoIt's funny, I grew up writing C++, but in an IDE. You're probably right that older people may have started programming before IDEs were commonplace (?). I've actually never liked using IDEs for interpreted languages, but have always used them for compiled languages. I'm talking specifically about tags, because it's the tool I'd need to use to get goto-anything functionality in vim using command-t or ctrlp. Whenever there's a debate about something like ST2 or an IDE vs vim/emacs, the argument is always “well you can do all that stuff with vim, just install x, y and z plugins", and I was making the point that with ST2, the out-of-the-box goto-anything functionality is really excellent. I love vim, and can't see myself ever going back on that, but I certainly appreciated with ST2 that the baked-in, absolutely-zero-effort-required goto-anything functionality was really excellent.
- Osiris 14y ago> I should make a video of me using multiple cursors, because I feel I'm not explaining it well at all. I'd love to have this explained better with good examples of where it's useful, other than just changing variable names. I understand this is one of the most used features but I have a hard time seeing a lot of use for it, but that's probably because I come from a single-cursor editor background.