tags:

views:

71

answers:

3

I built a fastfind database as mentioned in the following link as mentioned in the Unix Power Tools book. FastFind db is nothing but a file which contains a list of files in my project and I wrote a script to search the list for faster lookup.

Now, I would like to integrate this script with lookupfile plugin. From the lookupfile plugin help, it sounds like its possible. Although, I couldn't figure out a way to do it.

Any ideas?

Here is the link for lookupfile plugin:

http://www.vim.org/scripts/script.php?script%5Fid=1581

A: 

Did you see help section on "LookupFile_Bufs_BufListExpr"? There isn't a lot of information, but I saw that plugin/lookupfile.vim has usage examples, perhaps you can determine how to wire in your "lookup" into it?

BTW, you haven't actually given any link on how you are building your list of files or lookup of it? If it is faster than what lookupfile gives by default, I am interested to know what you do, as I sometimes wish it is faster.

Irha
I briefly, looked at the examples but, I couldn't go too far with it. But I will give it another shot. Here is hte link for builing a fastfind database: http://docstore.mik.ua/orelly/unix/upt/ch17_19.htmThanks!
Santoash C Rajaram
Sorry, I pointed you to a wrong setting, I think you need LocateFile_LookupFunc.Thanks for the link, it seems like the response time depends on the grep performance. Egrep should be very quick, but then you are not using regex's right? Also, I wonder if it will be faster than a looking up from a sorted tags file. Of course, they are not identical, as grep finds matches in the entire path, while tags lookup can be made restrictive to just the filename.
Irha
+1  A: 

I did something like this myself. You can read my blog post about it, and checkout the code:

dsummersl
A: 

I suggest you look at the following plugins, imo they provide a superior solution to the problem of finding files in your project (even though there are some warts):

http://www.vim.org/scripts/script.php?script_id=3025 The Command-T plug-in provides an extremely fast, intuitive mechanism for opening files with a minimal number of keystrokes. It's named "Command-T" because it is inspired by the "Go to File" window bound to Command-T in TextMate.

http://github.com/airblade/vim-rooter/tree/master/plugin/ Changes Vim working directory to project root (identified by presence of .git directory).