Bram,
currently the documentation at `:h autocmd` uses an example that does
not work. This:
`:autocmd! " comment`
will try to remove all autocommands for the group '" comment' and return
"E216: No such group or event"
So fix that in the documentation and mention, that a comment char will
be seen as part of the group name.
So please include the following patch:
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 678fb378f..ca48004ec 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -56,6 +56,8 @@ effects. Be careful not to destroy your text.
Add {cmd} to the list of commands that Vim will
execute automatically on {event} for a file matching
{pat} |autocmd-patterns|.
+ Note: A quote character is seen as argument to the
+ :autocmd and won't start a comment.
Vim always adds the {cmd} after existing autocommands,
so that the autocommands execute in the order in which
they were given. See |autocmd-nested| for [nested].
@@ -91,7 +93,8 @@ will appear twice. To avoid this, define your autocommands
in a group, so
that you can easily clear them: >
augroup vimrc
- autocmd! " Remove all vimrc autocommands
+ " Remove all vimrc autocommands
+ autocmd!
au BufNewFile,BufRead *.html so <sfile>:h/html.vim
augroup END
@@ -145,6 +148,8 @@ prompt. When one command outputs two messages this can
happen anyway.
plugins, syntax highlighting, etc.
:au[tocmd]! [group] Remove ALL autocommands.
+ Note: a quote will be seen as argument to the
+ :autocmd and won't start a comment.
Warning: You should normally not do this without a
group, it breaks plugins, syntax highlighting, etc.
Best,
Christian
--
Der Wegreisende glaubt stets, weiter zu sein als der Dableibende.
-- Jean Paul
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.