views:

244

answers:

2

I'm looking for a way to make Vim have the ability to open a file by fuzzy-searching its name.

Basically, I want to be able to define a project once, and then have a shortcut which will give me a place to type a file name, and will match if any letters match up.

This kind of functionality exists in most editors I've seen, but for the life of me I can't understand how to get Vim to do this.

Note that I'm looking for something that won't require me to have any idea where in my directory tree a file is. I just want to be able to open it by the filename, regardless of what directory it's in.

Thanks

+1  A: 

What about http://www.vim.org/scripts/script.php?script_id=1984 Then there is http://github.com/jamis/fuzzy_file_finder .

Also see these blog posts: http://weblog.jamisbuck.org/2008/10/10/coming-home-to-vim and http://weblog.jamisbuck.org/2009/1/28/the-future-of-fuzzyfinder-textmate

HTH

Zsolt Botykai
I looked at that, but it didn't seem to do what I wanted (it looks like it doesn't search for all files in the directory). Am I just setting it up incorrectly?
Edan Maor
You probably are. Normally, all files in a directory and all its subdirectories are included.
Ton van den Heuvel
Also: http://stackoverflow.com/questions/1894614/vim-fuzzyfinder-usage-tips-gotchas-how-can-one-make-use-of-this-plugin/1897075#1897075
Ton van den Heuvel
A: 

CommandT for Vim is very much the comparable feature as in TextMate. My work flow is now

1) open up MacVim

2) :cd ~/my_project

3) (I have this mapped as described in the installation help)

4) C-v the file to open the file in a vertical split, or CR to open a new horizontal split.

5) to close the split, use :bd (buffer delete)

6) to switch to another buffer, I have BufferExplorer installed, so just \be and select

This workflow is comparable to TextMate, it takes a while to get used to, and I'm still learning.

Alex Le