fuzzy finder - how to get it find files from root of my current dir located in any subdirectory?

187 views
Skip to first unread message

Rick R

unread,
Jul 5, 2010, 8:08:29 PM7/5/10
to vim...@googlegroups.com
Sorry if this is the wrong list to post this, but I'm trying to use the fuzzyFinder plugin with the rails plugin for my rails dev on vim.

I'm having difficulty understanding how to set fuzzyfinder so it will find any file (no matter how deep) starting from the root of my vim instance. So for example if I'm in /Users/rick/projects/myproject I want to be able to find any file beneath 'myproject.' Right now when I trigger fuzzy finder it starts by showing the files/dirs from the root 'myproject' but I can't easily find 'any' file (in any subdirectory) as I start typing it. I'm sure I'm missing something stupid.

My alias is

map <leader>f :FufFile<CR>


--
Rick R

rickywu

unread,
Jul 6, 2010, 6:57:40 AM7/6/10
to vim_use
> I'm having difficulty understanding how to set fuzzyfinder so it will find
> any file (no matter how deep) starting from the root of my vim instance. So
> for example if I'm in /Users/rick/projects/myproject I want to be able to
> find any file beneath 'myproject.' Right now when I trigger fuzzy finder it
> starts by showing the files/dirs from the root 'myproject' but I can't
> easily find 'any' file (in any subdirectory) as I start typing it. I'm sure
> I'm missing something stupid.
>
> My alias is
>
> map <leader>f :FufFile<CR>
you should type /Users/rick/projects/myproject completely, or define
shourtcut:
let g:fuf_abbrevMap = {
\ '^vim:' : [ $VIMRUNTIME ],
\ '^home:' : [ $HOME ],
\ '^myp:' : [ '/Users/rick/projects/myproject' ],
\}
then type myp:, it will popup the files under this dir.

Rick R

unread,
Jul 6, 2010, 10:51:44 AM7/6/10
to vim...@googlegroups.com

Yes it pops up files under this dir, but I want to allow for finding files in 'any depth' below the directory. All that abbreviation seems to do would allow me to easily search the root of the project from any vim instance. I'm looking for a way for it find any file within the current directory - even nested. Similar to the behavior you get in any of the IDEs - when your working on a project and you hit the short cut for "find file" it starts to find the file you are typing regardless of the directory its in. Right now, I can only seem to get FuzzyFinder to search in the current directory.

Rick R

unread,
Jul 6, 2010, 8:01:43 PM7/6/10
to vim...@googlegroups.com
On Tue, Jul 6, 2010 at 10:51 AM, Rick R <ric...@gmail.com> wrote:
 

  Right now, I can only seem to get FuzzyFinder to search in the current directory.

Found a post on another site. Solution append **/ after FuFile

so my mapping is now:

map <leader>f :FufFile **/<CR>

rickywu

unread,
Jul 7, 2010, 3:01:13 AM7/7/10
to vim_use
I suggest you use Lookupfile, it will use an index to open any files
in any folder which exists in index.

Nathan Neff

unread,
Jul 7, 2010, 12:45:17 PM7/7/10
to vim...@googlegroups.com

Rick, this is what I use also.

You might also be interested in :FufFileWithCurrentBufferDir**/
for example, if you only want to search the directory of the /current
buffer/ instead
of your projects directory. Sometimes I use that to weed out search
results that I don't
care about.

Reply all
Reply to author
Forward
0 new messages