Re: custom-command-completion and access to built-in completions
On Wed, 24 Mar 2004 at 11:09am, Hari Krishna Dara wrote:
> > > Meanwhile, I am wondering if I can just use glob() function by appending
> > > '*' over the partially typed in text (I will have to find the substring
> > > from the previous unprotected space) to get the same result. My brief
> > > experiments show that it can work, but I would appreciate if someone can
> > > confirm.
> > For file name completion glob() is the right thing.
> Thanks for confirming this.
I was trying to implement this solution with glob(), but I realized it is
not worth doing. I got it nicely figured out when to do glob(), but
what I realized is that the default file completion does more than just
glob(). It appends path separator automatically if it is a directory, it
converts the pathseparator automatically based on the 'shellslash'
setting (which would even be impossible with this approach) and may be
Also, there seems to be some bugs in handling the completion options.
When the partial string was 'src\A' my completion function returned
glob('src\A*'), but Vim ignored all the return values for some reason.
But when I tried to complete 'src\', I nicely got the completions for
all files under src.
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.