On 7/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
It is possible to remove all autocmds in the autogroup. However, when I
want to temperilly "disable" the autogroup, and "enable" it in the future.
I need to copy the source.
Example: Suppose there is some autogroup HisAutoGroup in one of my startup
scripts.
In one of my script, I need to disable the group "HisAutoGroup", do
something, then enable all the autocommands in the group again, but do not
want to know where the "HisAutoGroup" defined and do not want to copy the
source to my script.
Any work around for that?
This is your code, right ?
If this's your code, you could can solve it like this:
let g:MyEnableAu=1
:aug MyGroup
:au BufRead * if g:MyEnableAu | .... | endif
:au BufWrite * if g:MyEnableAu | .... | endif
...
:aug END
Then you can enable/diable all autocommands in the group
by toggling the g:MyEnableAu variable. Simple.
Yakov