0 minutes with Vim

So lately I’ve been dabbling with Emacs trying to see whether I could make it my full-time coding editor. At first I suspected that I wouldn’t be able to make the jump, although later I started to think that I might be able to make it work after all.

Well, yesterday I decided to start looking at Vim before I got in too deep with Emacs. I was prompted to have a look on stumbling across this weblog post by Jamis Buck, where he says:

The vim landscape is different now. There is actually a Mac-friendly GUI version of vim now, MacVim, which actually looks like it belongs on OS X. Vim 7 supports UI tabs, and a much more powerful auto-completion mechanism than before. And plugins like rails.vim and fuzzyfinder.vim mean that TextMate no longer has a corner on powerful project navigation.

For the last few weeks I’ve been toying with switching back to vim. TextMate’s "snippet" feature never clicked for me, and the only times I used it were by accident (when it annoyed me more than it helped me), but I really was hooked on the project browser, and cmd-T, and a few other things. I realized that, with a little work, perhaps a way could be found to reimplement most of the things I loved about TextMate, in vim.

This last week I’ve worked exclusively in vim, to test that theory. It’s like coming home. As I said, TextMate is a powerful and wonderful editor, too, but differently powerful and wonderful. Vim’s wonderfulness and power is the wonderfulness and power of git, or linux, where the learning curve is steep (ridiculously steep at times), but the rewards of mastery are sublime. I didn’t even realize I had missed a sane shift-J, or using the dot key to repeat the last command. Fix transposition typos with 'xp'. Select a single word with 'viw'. Drop bookmarks with 'm', and jump right back to them with single quote.

So I’ve decided to take a look and make a series of posts detailing my impressions after using MacVim for 0 minutes, 1 minute, 5 minutes, 1 hour, 5 hours, 1 day, and so on.

0 minutes with Vim

My initial feelings are optimistic. This is a 7.6 MB download instead of a 37.2MB one. The scripting language looks like something I could realistically learn in a short timeframe, unlike Emacs Lisp which I suspect would take a long time to get up to speed in. Something just "feels" right about this.

My very first impression on launching MacVim for the first time is that it is much, much more "Mac-like" than Carbon Emacs. A toolbar that looks like a real Mac toolbar (even though you’ll probably end up hiding the toolbar as soon as you learn all the keyboard shortcuts); a real preferences window; text views that seem to "fit" better inside their windows; a tabbed interface; Mac keyboard shortcuts that work by default and which don’t conflict with the "true" Vim shortcuts because none of the latter use the Command key anyway.

Will Vim prove to be better than Emacs?

Who cares, really? In my opinion getting into an editor war is one of the most imbecilic things you could possibly do with your time. Both Emacs and Vim are clearly amazing, powerful, extensible pieces of software that can be used by skilled people to edit in an extremely efficient manner. Debating the wisdom of architectural and design choices in these two coherent, highly-evolved pieces of software really is a waste of time. At the end of the day you can basically do everything in one that you can in the other; the only difference is how you get there and that’s where personal, subjective preferences start to come in.

The important question for each person to ask is not, "Which is better?", but "Which is better for me?".