aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/usr_40.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/usr_40.txt')
-rw-r--r--runtime/doc/usr_40.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/doc/usr_40.txt b/runtime/doc/usr_40.txt
index 5b1254e2ae..f47c933124 100644
--- a/runtime/doc/usr_40.txt
+++ b/runtime/doc/usr_40.txt
@@ -463,6 +463,17 @@ separated) that trigger the command.
The optional [++nested] flag allows for nesting of autocommands (see below),
and finally, {command} is the command to be executed.
+When adding an autocommand the already existing ones remain. To avoid adding
+the autocommand several times you should use this form: >
+
+ :augroup updateDate
+ : autocmd!
+ : autocmd BufWritePre * call DateInsert()
+ :augroup END
+
+This will delete any previously defined autocommand with `:autocmd!` before
+defining the new one. Groups are explained later.
+
EVENTS