Skip to content

Instantly share code, notes, and snippets.

@jedfoster
Created December 19, 2012 19:57
Show Gist options
  • Save jedfoster/4339935 to your computer and use it in GitHub Desktop.
Save jedfoster/4339935 to your computer and use it in GitHub Desktop.

Vim, Day 7

I have found myself using Vim for a lot more than I intended. Last week I thought I would only use it on those few occasions when I needed to jump to a text editor from the command line. One week in, I have changed the default application for XML, SQL, ERB, and ASP—don't ask [shudder]—file types to MacVim. I'll probably change shell scripts and Ruby files soon as well.

TextMate is still my primary editor, mainly because I frequently work with groups of files as a project. While NerdTree helps, the TextMate project model—especially with the Project+ plugin—is very comfortable. And when it comes to the tools we use comfort is a huge factor, arguably even bigger than efficiency. A comfortable coder is usually more efficient than an uncomfortable one.

The main hurdle for me with projects in Vim is the concept of buffers, windows, and tabs, which differs from the TextMate model of tab == file and window == collection of tabs. I'm still trying to wrap my head around it all, but these links had some helpful information:

I'm also still struggling with all the different keyboard commands; I have to build up all new muscle-memory. And many of Vim's commands aren't chords (Command-Shift-S), but phrases (:w) where each character is typed. It's a different model and takes some getting used to.

A few TextMate niceties I miss in Vim are automatic tag completion and in-app web preview. I understand that Vim can have similar functionality through a dizzying array of plugins, but I haven't had time to play with any. A couple of plugins that I plan on investigating this week are:

A few more miscellaneous links I found of interest this week:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment