When Jamis Buck switched from TextMate to vim, he found he missed one bit of functionality above all others: TextMate's file finder, Cmd+T.

Being a capable programmer, he "took an evening" and wrote up a Ruby library to replicate this functionality.  Then he extended vim with a plugin called fuzzyfinder_textmate that called out to this Ruby library.

The results were terrific, and fuzzyfinder_textmate is my go-to solution for opening files in vim.  I almost never type ":e ..." anymore.  I've yet to see anything faster at grabbing a file buried somewhere in a directory tree. This plugin is particularly useful for me when working on Rails projects, where vim's 'current directory' is Rails.root, and everything I want to open is down at least one level.  If you're not familiar with the plugin, here's a silent-movie-style screencast Jamis put together when he released it.

Sadly, this terrific plugin has a bit of a problem: it's a pain in the ass to install.

Jamis' fuzzyfinder_textmate relies on a second plugin, called fuzzyfinder.vim.  The author of this plugin makes frequent changes, which usually end up breaking fuzzyfinder_textmate.  This got to be too much for Jamis, and he officially dropped the project a year ago.  Today, the latest versions of these plugins won't work together.

However, thanks to several contributors and github's forking, you can get this big mish-mash of libraries and plugins to work...provided you install exactly the right versions of each.  It's a trifle annoying, but fortunately I've done the homework for you.  Follow the steps below and enjoy my favorite bit of vim functionality.

Installing fuzzyfinder_textmate:

  1. Make sure you're using vim 7.2 (the latest, as of this writing).  It's possible earlier versions work as well, but I can't confirm these steps will apply.
  2. Make sure the vim you installed was compiled with ruby support.  Check this by running vim --version | grep ruby at the command line.  A result of +ruby means you're good, -ruby means you DON'T have ruby support.  Debian/Ubuntu users can get a ruby-capable vim by running sudo apt-get install vim-ruby.  Another test to make sure you've got ruby support: type :ruby in vim.  Argument required is good.  Not an editor command: ruby is bad.
  3. Install Jamis' fuzzy_file_finder Ruby library from here.  This is installable as a gem, but I strongly recommend simply git cloneing this repo, creating a ruby directory in your .vim folder, and placing the lib/fuzzy_file_finder.rb inside there.   This keeps this dependency in your .vim directory (rather than on a system gem you'll forget about when you change servers), and enables keeping your vim configuration in a git repository (HIGHLY recommended).
  4. Install vim-fuzzyfinder version 2.22.3.  IMPORTANT: you MUST use this exact version.  Other versions (particularly anything NEWER than this one) will NOT work.  After installing, confirm it works by running :FuzzyFinderFile in vim.  You should get a pop up box with a list of files.  If you do you're almost there.
  5. Install fuzzyfinder_textmate, but use sethbc's fork from github.  Don't use the version from Jamis' repo as it will NOT work with the version of fuzzyfinder.vim we installed.  git clone again, and simply put fuzzyfinder_textmate.vim in your .vim/plugin folder. To test that everything worked, run :FuzzyFinderTextMate in vim.  If you get a popup box, you're done!

If you're having trouble, the most common culprit is that you've mucked up the versions.  This collection of files is quite finicky, and if you're using the wrong version of any one things fall apart quickly.  After that, double-check you've got Ruby support.

If you're still having trouble, do a git clone of my dotfiles.  My setup is confirmed working, so you can diff your copies of the library/plugins against mine.  Any differences mean you've got the wrong version.

If you still have issues, leave a note in the comments and I'll try to get you sorted out.

Finally, if you found this post useful, I'd urge you to check out my screencast: Vim for Rails Developers.  In it, I'll teach you the best plugins, external tools, and editing tricks for writing Rails code at top-speed.  If you write Rails code in vim, it's sure to save you time.