Benjamin Reitzammer <[EMAIL PROTECTED]> wrote:
I'm forwarding this to the list so that everyone can help :)

---------- Forwarded message ----------
Date: Tue, 9 May 2006 19:36:45 +0200
From: Benjamin Reitzammer <[EMAIL PROTECTED]>
To: Gerald Lai <[EMAIL PROTECTED]>
Subject: Re: fast file opening / find file as you type

Hi,

On 5/9/06, Gerald Lai <[EMAIL PROTECTED]> wrote:
> On Tue, 9 May 2006, Benjamin Reitzammer wrote:
>
> [snip]
> >> Regarding :find. It does not do &path-full completion, and
> >> no 'incremental completion menu'. To write such plugin, you'd
> >> need to process every typed character.
> >
> > Yes I tried, :find and that it's not doing completion of my filename,
> > is something that makes it a lot less useful. Sure it broadened my vim
> > skills ;) but it's still not as good as the described solution the
> > jedit plugin offers.
> [snip]
>
> This has been suggested in the list before (by Hari, I think). Put these
> lines in your vimrc:
>
> ==
>    command! -nargs=? -complete=custom,PathFileComplete -bang -bar Find
> find<bang> <args>
>    function! PathFileComplete(ArgLead, CmdLine, CursorPos)
>      return substitute(globpath(&path, a:ArgLead."*"), "[^\n]\\+/", "", "g")
>    endfunction
>
>    set wildmenu wildmode=longest:full
> ==
>
> Then instead of doing
>
>    :find <partial filename>
>
> do
>
>    :Find <partial filename>
>    (notice the capital "F")
>
> Completion will work now. :Find is :find with completion.

Wow, thanks ... this is cool.

> Take note of what Jürgen & Tim had to say. :Find will look in the
> directories specified in the option 'path', as Jürgen mentioned.

Don't call me picky ... but there's the problem (at least if
understand the help for the path option correctly). If a path ends
with ** it searches only for directory names, while * searches only
the direct subdirectories for the given paths.


In vim7 dir/** shows matches both in directory dir itself
*and* in subdirectories. This is better than in 6.4 where
dir/** didn't show matches in dir itself (only in
subdirectories of dir)

Yakov

Reply via email to