My Latest Tweet

 

@josephjaramillo on twitter

Obligatory Portrait

Joseph's Portrait

My name is Joseph.
I make web apps.

I'm half of fiveby.
I built whspr!

I heart Ruby.

I pretend I'm a designer
when no one is looking.

More details over here.

My MacVim Setup

by Joseph Jaramillo

I’ve long had an interest in Vim, but learning a new text editor is a major endeavor for any developer.  We spend the overwhelming majority of time working in text editors, and like anything else choosing the right tool is important.  After a certain amount of time the tool fades into the background, and using it becomes completely second nature.  I moved away from the Eclipse IDE to TextMate when I got into Ruby, and it has seen me through many a project.  With the right bundles installed TextMate is a fantastic tool.

So why use Vim, or more specifically, MacVim?  At this point, I still can’t say.  It’ll take some time after I’m used to its paradigm and have built up enough muscle memory for me to be able to say whether or not it’s better for me.  That being said, I knew that there were a few tools I’d absolutely need it to have for it to have a chance at competing with TextMate.  Thankfully, Vim has a robust plugin system and a huge user-generated library from which to choose.

My MacVim Setup

I spent some time using TextMate, taking note of which of its facilities I used most often.  What emerged was something of a blueprint for what I’d need Vim to either replicate or replace.  The following plugins did the trick:

  1. NERDTree – A Project Drawer-like file browser
  2. FuzzyFinder – A fuzzy-search based file navigation mechanism
  3. FuzzyFinder TextMate (Blog) – Provides ⌘-T functionality via FuzzyFinder
  4. Rails.vim – The Vim equivalent of the Ruby on Rails TextMate bundle
  5. snippetsEmu – Provides tab triggers and other nifty TextMate-like snippet functionality

There’s clearly a pattern here.  At one point I stopped and asked myself why exactly I was trying to reimplement TextMate in Vim.  The reality is that these tools have a very strong connection with the way I work, and most of them aren’t particularly unique to TextMate.  The fuzzy-file-search mechanism is something that appears all over the place.  We use it all the time in tools like LaunchBar and QuickSilver.  Rails.vim brings Rails awareness to Vim; all good text editors support extensions like this.  The only thing up there that’s unique to TextMate is the tab-trigger snippets.  I’ve got no excuse for that one.  It’s a really great feature in TextMate, and I think all text editors should have it.

I had some difficulty getting FuzzyFinder TextMate working until I discovered that Jamis had stopped working on it.  It had fallen out of sync with FuzzyFinder, on which it depends.  Tracking down the latest version of FuzzyFinder that was known to work solved the problem.  It looks like there’s a fork on GitHub that’s been brought up to date, but I haven’t yet tested it.

My configuration is on GitHub.  If you find any mistakes or have any suggestions for improvement, please feel free to fork it and send a pull request.  I’m still a Vim noob, but I’m impressed so far.

Share:
  • Twitter
  • FriendFeed
  • Facebook
  • del.icio.us
  • Digg
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • RSS
  • Print this article!
  • E-mail this story to a friend!

Tags: , , ,

3 Responses to “My MacVim Setup”

  1. Anon

    You can also take a look at the snipmate plugin. It does snippets in a better way than snippetsEmu imho.

  2. Rob

    Thanks for your nice summary. I think I’ll be going to vim from textmate trial. I like the cocoa gui, but vim commands are pretty good and can be useful on machines other than my own mac.
    Not sure if I’ll bother with the TextMate addon for fuzzy.

  3. Rick R

    TextMate frustrates me to no end so thanks for hosting your code on github so I can move over easily to MacVim. Made it really easy to get setup.

    One thing I can’t figure out though… how can I get the fuzzy_finder ignore string to ignore certain directories? I’ve tried:

    FOO
    **/FOO/*
    */FOO/*

    nothing seems to work for me?

Leave a Reply