Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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