I love Vim and Textmate

If you follow me you'll notice that I've been playing with Vim lately. For almost a year now I've been a TextMate fan but something about Vim just called to me. Maybe it was the feeling that knowing Vim increased my geek cred just like terminal hackery does.

[caption id="attachment_1307" align="aligncenter" width="500" caption="Vim and TextMate sitting in a tree"]Vim and TextMate sitting in a tree[/caption]

Why Vim

Really anyone doing any type of coding should be fairly comfortable in Vim (if you're not I know a post on Vim). Vim is on any Unix system so it's on all the servers you're putting client sites on. If you have SSH access to your server Vim is way faster than FTP trickery.

Vim's Killer Features (yeah I mean good things)

The feature I miss the most from Vim (when I'm coding in TexMate) is the modal editing. Just by hitting escape I'm moving the cursor around. Then start looking at using 'W' and 'B' to move whole words and you're flying around the file so fast your hair will curl.

NERDTree is another pretty dang awesome Vim feature. Yeah I know it's a Vim plugin but just go install it since it should just be included by default. NERDTress gives Vim a project browser like any other modern GUI text editor. You can move around with the normal Vim keys and open,close files lightening fast. It's also super easy to jump to the parent folder and close it.

Vim's Killer Features (as in your dead to me)

That dang copy/paste buffer. So you have a normal system wide copy/paste buffer that is pretty much the same no matter what operating system your on. Well Vim doesn't care about that and it doesn't use it. You see Vim has it's own copy/past buffers that only work inside Vim (at least as far as I can determine) and the system ones don't work. So that cool piece of code you put in your blog so you could reuse it, yeah it won't paste into Vim, sorry.

No CMD+t to open a file in a project. While NERDTree rocks it's still no CMD+t from TextMate. Sure PeepOpen adds that type of function to MacVim but not to Vim (and of course it couldn't if you used it on a remote server).

[caption id="attachment_1310" align="aligncenter" width="500" caption="TextMate go to file CMD+t"]TextMate go to file CMD+t[/caption]

Still Using TextMate

Really the only feature from Vim that I miss when using TextMate is the navigation of code with HJKL. There is a plugin that adds this to TextMate but I've found it a big buggy (lets just ignore the fact I'm on a hackintosh please). Well that's not quite right I TextMate started having occasional issues getting stuck in the project drawer after I renamed a file, after I installed ViMate.

That's All She Wrote

So I'm going to stick with both Vim and TextMate for now. Neither is quite what I'm looking for in a code editor. They both have awesome features and things that are a bit lacking.

At the very least if you're working on code use Vim long enough that you're comfortable in it. It just makes you a more well rounded coder. One day the time you spent in Vim will save your ass when you need to live edit some files on a live server that keeps dropping FTP but keeps and SSH connection. Trust me it saved my ass more than once.