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.


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.