On Fri, May 08, 2009 at 09:12:12AM -0700, Ben Fritz wrote:
> 
> 
> 
> On May 8, 8:12 am, "Wu, Yue" <[email protected]> wrote:
> > I have defined several cmds in autocmd Foo, if I want to remove just one of
> > cmds from Foo event, how to do it?
> >
> 
> >From :help autocmd-remove, it appears that you can't, if the autocmds
> all have the same group, event, and pattern.
> 
> You could define them in different groups if they must have the same
> event and pattern if you want this capability.

Nice. IIUC,

For defining a group:

>    augroup mygroupname
>        au!
>        au BufEnter {cmd}
>    augroup end

For running it:

>    doautocmd mygroupname BufEnter

For disabling it:

>   autocmd! mygroupname BufEnter

For removing it:

>    augroup! mygroupname

Right?

-- 
Hi,
Wu, Yue

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to