Thursday, November 4, 2010

Vim at last

I've been using TextMate for a long time, and I love it. Starting my career in Visual Studio, the monster of all IDEs, I've gradually simplified over the years one small step at a time; First by moving to Eclipse, Than XCode, to netbeans, finally to TextMate, which I've been using for 3 years now. However, over that time period I've watched friends of mine blaze away in their code with their mystical mouse-less ways on editors like EMACS and VIM. Today I decided to dive in and try it out myself.

Setup

Downloading the Mac OS X binary for MacVim from the google group is not really in the spirit of the game (if I was feeling hardcore today I'd compile it from the source on github repo), but it sure is fast for setup. Uncompress, move the .app file into the Applications directory, and away you go (you can also move the "mvim" script that comes along with the download into a folder that's on your Path so you can open it from the command line any time; I did). Of course, that's also when I realized that the console version of Vim comes standard on my Mac. Oh well, use which ever you prefer.

Learning

The first thing I notice is that nothing makes sense. I can't seem to click anything. Than I remember that you aren't really supposed to be trying to click on things if VIM is your editor of choice, because it's keyboard focused. Realizing I'm not going to figure this out myself, I opt for running "vimtutor" at the console which gives you a concise walkthrough on how to operate inside this strange program.

Results

...Time passes...

Ok, so now I can move text around in VIM pretty comfortably, and when editing a single file, I'm pretty solid. I'm happy with how short the commands are to do things that require a lot of highlighting and click-dragging in modern editors (delete a full line, jump a few words down the line, etc). What I'm NOT comfortable with yet is jumping around to different files in a project, and the syntax highlighting is still unfamiliar to me. However, the only way to GET used to it is to use it, so although it's going to hurt for the first couple days I'm sure, I think I have enough solid ground under my feet to make a go of it.(EDIT: rails.vim makes a big difference for me)

Stay tuned for updates on whether I find out that this really improves my coding or not.

No comments: