Jeff Kreeftmeijer

Stumbling into Vim


I’ve been using Textmate since I switched to the Mac a while back. It worked properly and I was fine with it. I never looked into Vim until a few months after @antekpiechinik told me I should. That was last week.

To be honest, I thought Vim was for people that felt too cool to go out of their terminals and that it didn’t really add anything other than “I’m in the terminal”-awesomeness. Needless to say, I was wrong.

After I got excited by this “Welcome to Vim”-video, I dove into the vimtutor to learn about normal, edit and visual mode, jumping though files, deleting, adding copying and editing stuff, running terminal commands from my text editor and stuff like that. vimtutor is awesome, it walks you through the very basics to get familiar with the commands you’ll be using most.

After finishing that, I realized Vim was blazingly fast if you know the right shortcuts to use. Also, I felt quite confident about the Vim skills I learned, which lasted for about ten minutes until I tried to edit an actual Ruby file, got stuck and came to the conclusion that I forgot half of what I’ve learned.

Although I’m still struggling, I believe using Vim will be a lot faster in comparison to Textmate after a while. I’ll probably have to go through the vimtutor again some time, though.

Customizing Vim

MacVim with the Railscasts color scheme and NERDTree

I’ve never really taken the time to customize Textmate, except for installing the Railscasts theme and the Ruby and Rails bundles. That was all I needed. No RSpec or Git bundles, I prefer to run specs and push to my repository in the terminal. Heck, I never even used Textmate’s snippets and forgot to use CMD+T to open files all the time.

After using Vim for a while, I realized I was missing some things. So I installed the Railscasts Vim color scheme and NERDTree as substitutes for Textmate’s theme and project drawer.

NERDTree is an awesome plugin, but since I got tired of typing :NERDTreeToggle to open and close it I mapped it to my F2 key. Super fast.

Vim has no line numbers by default, which creeped me out. Putting set number in my ./~vimrc file did the trick. I searched around and stole some settings from other people too. Man, this thing is customizable.

Oh, I’ve put everything in my dotfiles repository on Github. In case you need it.

As I said, I still have a lot to learn but I think I’ll stick to Vim for at least a while. So, keep an eye on this space for more vim stuff in the future and if you have some tips: be sure to let me know!