The switch (back) to vim

06 Jan 2011

While I have to thank TextMate for being the editor that was my gateway drug into Rails (and back into programming), I kept having loads of issues with it (while I still think it's hands down better than any of the new editors I've seen and much prefer it to a host of IDEs): It crashed pretty regularly, I found it slow and had to wait for it quite often, I was constantly switching between it and the command line and project searches beachballed all. the. time. I also have to admit to having had more than a little bit of guilt that I'd added yet another Mac-only title to my list of software. Somewhere in the back of my head I still keep trying to convince myself I'll move back to Linux... someday cough. (Note that my purpose here isn't to wail on Textmate. It is a great piece of software and I do owe it a debt. I just decided I needed to move past some of the limitations I'd been experiencing.).

But the fact is, despite removing bundles and installing fresh and saving when the application lost focus I still kept having problems. A few weeks back, a crash took a solid hour's work with it and I wasn't sure how to reconstruct what I'd done and I made a dark vow to switch to vim as my dev environment. I'd heard good things about the new plugins and using it as a dev environment and it is a sad thing to say that I first learned vim (well, vi) nearly 15 years ago, though I'd never say I mastered it. And since 2011 is a planned year of focus and mastery (more on that later) I decided to take the plunge (back) in.

First off, just to put yourself in the right mind frame read what the Great Yahuda has to say about his switch back. It's true, you don't need to be a vim jedi right away, but everyone has work to do and switching means you can't lose too much productivity with the switch. So, that was kind of my aim. And it let me know I wasn't navigating into dark, unknown Here Be Dragons territory (like I usually do).

Second of all, take a look at this fantastic blog post by Daniel Fischer on switching (published just a few days before I took the plunge). It tells you basically everything you need to know and in particular, gives you a solid idea of what you really need to do. Use MacVim, get used to the modes and use the proper plugins like the Janus set.

Armed with that, and a few screencasts (check out vimcasts.org and the peepcode vim screencast I and screencast II.), I set all major source and test file attributes to MacVim and took the plunge.

I think because I've been using vim on servers for so long for basic editing, I've just gotten used to some of the commands, so the switch might have been much easier for me, but even getting back into it now has started me up with new power commands and using the plugins has actually made me far more productive than I thought I would have been almost right off the bat.

First off, speed. Vim is really, really fast compared to Textmate. The difference is immediately noticeable as is general responsiveness. Don't ask me why, but you feel more productive.

Basically, I've been super happy with the switch though like every change there are a few things that I'd love to sort out.

So, if anyone has ideas for those let me know. I've already started modifying my .vim files (god help me) to work more the way I like.

Still, if you are thinking of making the switch, I highly recommend doing it. The drop in productivity is negligible unless you are a Textmate power user and the benefits are immediately apparent as soon as you get used to a few of the most used commands.

Happy hacking.

Posted by Daryl on