Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just started using VIM, and really missing the quick-open file feature most descent text-editors have. I added FuzzyFinder to my plugins, but can't figure out how to best make it do just that - search recursively and open a file in the current dir I'm working in (including subdirs!) by specifying part of the file name. I Right now it makes me walk through all the subdirs until I find what I need. So I have to name each part of the full path until I find what I want. I'm using the :FufFile option. For example (rails app root folder):


app > views

app > views > main

app > views > main > index.erb (found!)

In each case I have to enter at least 1-2 letters of the dir/file for the level I'm in, when all I want to do is type a couple of letters and be shown all the files that match that pattern. Am I doing it wrong, or is there some kind of customization needed? thanks.

share|improve this question
up vote 2 down vote accepted

In recent versions of Vim, you can specify a recursive search for a file by prefixing the file name with **/. Following your example, you could type

:e **/in

followed by a tab to see a list of all the files in the current directory and below beginning with "in" and with "in" expanded to the longest common prefix. See also

:help wildcard
:help cmdline-completion

The version of Vim about to be released, 7.3, will add file name expansion to the recursive searching capability of the find command. Then, adding ** to your 'path' option will give you the behavior you want: type :find, the first few letters of the file name and a tab to have the name expanded to the matching names in the current directory and below.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .