I guess this may not be all you want, for example, if you want to search
files in ~/src, now you got a file in ~/src/abc/def/.

Then your current directory is ~/src/abc/def/. and when you need to search
within ~/src again to find something in ~/src/ghi/jkl/., how to do that?

I recommend a probably better approach, just create a filelist inside the
~/src, you can use the following command to create the file list:

in ~/src:
find . > filelist

okay, now each time you want to search for file, just open the filelist,
and search for the filename, when you've got the desired file, use gf to
open the file. You can also map a shortcut-key to open the filelist.

for example: I use <f12> to open the file list, press <f12> and now the
filelist opens.
use /foobar.txt and press enter to search for the file, if the file has
multiple occorences, press n.
when you've got the file, press gf and the file will be opened.

--
Sincerely, Pan, Shi Zhu. ext: 2606


"Zheng Da" <[EMAIL PROTECTED]> 写于 2006-10-16 22:24:47:

> I have used your script, but it can't content me.
> I want to find the file under the current dir, its subdir or maybe its
> sub-subdir. So I hope while I'm inputting the filename, the popup menu
> should display the paths with the file, not the dir, containing the
> characters I input.
>
> --
> With regards
> Zheng Da
>
> On 10/15/06, Hari Krishna Dara <[EMAIL PROTECTED]> wrote:
> >
> > On Sun, 15 Oct 2006 at 3:41pm, Zheng Da wrote:
> >
> > > Hello.
> > > I want to open a file, and I know its name, but don't know the path.
> > > I want to use the command "find". For example I want to open the file
> > > space.cc, and use the command :find space.cc. I know the file may be
> > > in the current directory, or the subdirectories, but always get the
> > > error E345: Cannot find file "space.cc" in path. I use the default
> > > path, it should be .,/usr/include,,. (I use Linux).
> > > So what's the problem? And how to open the file I want?
> >
> > You got the answer for using :find command already, but I would like to
> > suggest you to try my LookupFile plugin that allows you to use the Vim7
> > popup completion to do this using custom tags files.
> >
> > http://www.vim.org//script.php?script_id=1581
> >
> > --
> > HTH,
> > Hari
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >

Reply via email to