Hi Bill,

vimrc is read before plugins, so your au! command in .vimrc can't replace the
AsNeeded autocommand because AsNeeded hasn't been defined yet.

regards,
Peter



--- Bill McCarthy <[EMAIL PROTECTED]> wrote:

> Hello Vim List,
> 
> Suppose two plugins define autocmds, so after start Vim,
> 
>     :au FuncUndefined
> 
> displays:
> 
>     *         call AsNeeded(1,expand("<afile>"))
>     Tlist_*   source C:\vim\vimfiles\plugin\taglist.vim
> 
> Now I add a line to my _vimrc:
> 
>     au! FuncUndefined * call Foo()
> 
> Now after starting Vim and typing :au FuncUndefined
> 
>     *         call Foo()
>               call AsNeeded(1,expand("<afile>"))
>     Tlist_*   source C:\vim\vimfiles\plugin\taglist.vim
> 
> It did not replace!
> 
> Now removing the line I added to _vimrc, starting Vim and
> typing :au! FuncUndefined * call Foo()
> 
> I get what I expected from :au FuncUndefined
> 
>     Tlist_*   source C:\vim\vimfiles\plugin\taglist.vim
>     *         call Foo()
> 
> Vim only appears to fail in startup - it is not just a
> script error.  If I write a small script file that just
> contains the line:  au! FuncUndefined * call Foo()
> 
> Sourcing that script works just like typing the command.
> 
> -- 
> Best regards,
> Bill
> 
> 


Send instant messages to your online friends http://au.messenger.yahoo.com 

Reply via email to