Aaron Sumner


Learning Vim, a little at a time

No joke: Under the awesome-skills-to-get-me-hired section of my résumé, I list Vim when I have to. And when I have to typically translates to when editing a file on a server. I've gotten a lot better, though. I even extend my use of Vim to my own workstation–taking notes and even editing the one-off Ruby file or blog post. I think my approach to the learning challenge has helped.

First, start with the (very) basics: There are tons of Vim tutorials out there, especially ever since favor turned from the likes of TextMate (version two of which is still my preferred daily editor, by the way) to the tried-and-truism of Vim and Emacs. Of all the resources I've checked out, though, two stand out: The built-in vimtutor lesson; and Learning the vi and Vim Editors by Robbins, Hannah, and Lamb. (Full disclosure: I work for O'Reilly Media, publisher of this book.) I like them because they start with the basic stuff you need to do to get around your editor. The book actually starts with vi commands–in fact, I haven't even gotten to the Vim stuff in it. Too many other tutorials jump past the basics, and/or suggest you start off with a custom configuration that may or may not suit your own needs.

Along those lines, start with a blank vimrc: In my daily practice with Vim, I come across things I'd like it to do for me. I know that an editor that's been around as vi/Vim has should let me do these things. Once I know what I need to set, I add it to my own vimrc configuration file–not a file that I downloaded elsewhere in order to theoretically ramp up quickly. I'm finding it much more constructive to build up my own configuration as I discover the functionality I need. I know it's tempting to borrow a more experience Vim user's configuration and run with it, but I'm finding it much more constructive to build my own as I go.

Finally, I practice a little, every day. I'm not quitting TextMate cold turkey for Vim (or any other editor)–I've got deadlines to meet, after all. But I do pick a task or two each day to work on in Vim. As I run into things I wish I knew how to do with it, I look that thing up, make a note of it (and, when applicable, add it to my personal vimrc file), and move on.

This approach keeps me moving forward, without getting too frustrated.

. Questions or comments? Let me know what you think.