There’s a (Vim Plugin) for That! Part I: Fuzzy Finder

One of the most popular features of TextMate and RubyMine is Command-T, the ability to jump to a file with just a couple of keystrokes. Vim lacks this feature out of the box, leaving Vim newcomers less efficient.

For the casual Vim users out there, when in doubt, remember this: there is a plugin for that!

FuzzyFinder

Partially enter the thing of interest, i.e., class name, method name, or file name, FuzzyFinder will take you there. Its three most useful features are:

  • When you know where you want to go, type in a couple letters, FuzzyFinder will autocomplete or “fuzzy match” the object in question.
  • When you don’t know where you want to go, FuzzyFinder can be used as a file explorer.
  • When you want to jump into currently opened files, FuzzyFinder can be used as a buffer explorer

Setup

After installing FuzzyFinder, add the following lines to your .vimrc:

nmap ,f :FufFileWithCurrentBufferDir<CR>
nmap ,b :FufBuffer<CR>
nmap ,t :FufTaggedFile<CR>

Then, generate the tag file:

 ctags -R --extra=+f .

Usage

One Plugin to Rule Them All

Other Vim plugins, such as NERDTree and Command-T, are great in their own rights; but FuzzyFinder offers the combined features of both plugins with a better UI and workflow.

About Rit Li

programmer and footballer
This entry was posted in Process and tagged , . Bookmark the permalink.

7 Responses to There’s a (Vim Plugin) for That! Part I: Fuzzy Finder

  1. Jared Carroll says:

    Sweet Vim tip Rit.

    Command-t in TextMate and RubyMine are some real time saves. With FuzzyFinder you can have the same in Vim. No need to use those kludgy editors. Vim FTW!

  2. Rob Pak says:

    I really missed RubyMine’s search for and open a Ruby class (Command + n or ⌥N) command and similar search for and open file command (Command + shift + n, ⌥⇧N). With fuzzy search and ctags, I now have a reasonable replacement in vim. Thanks!

  3. Andy Stewart says:

    I highly recommend PeepOpen for this.

    http://peepcode.com/products/peepopen

  4. Chris Hartjes says:

    There is also Command-T plugin for vim, but it requires you to do a little bit of work in creating a C extension for Ruby http://www.vim.org/scripts/script.php?script_id=3025

    • ches says:

      To be clear, that’s compile a C extension, not create one. Basically it means you run rake make after downloading it :-)

      I find it superior to FuzzyFinder, and though PeepOpen is sexy, it is not cross-platform nor console Vim-friendly.

  5. Uri Sharf says:

    Seem to have a dependency on another utility plugin “l9″…

  6. Pingback: Total Finder | The future belongs to those who prepare for it today

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>