summaryrefslogtreecommitdiff
path: root/runtime/doc/autocmd.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/autocmd.txt')
-rw-r--r--runtime/doc/autocmd.txt11
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 328d6ff6a..ee2dc562b 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt* For Vim version 8.2. Last change: 2021 Mar 13
+*autocmd.txt* For Vim version 8.2. Last change: 2021 Apr 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1522,7 +1522,14 @@ option will not cause any commands to be executed.
loaded buffer. The current buffer is done last.
Note that [fname] is used to select the autocommands,
- not the buffers to which they are applied.
+ not the buffers to which they are applied. Example: >
+ augroup mine
+ autocmd!
+ autocmd FileType * echo expand('<amatch>')
+ augroup END
+ doautoall mine FileType Loaded-Buffer
+< Sourcing this script, you'll see as many
+ "Loaded-Buffer" echoed as there are loaded buffers.
Careful: Don't use this for autocommands that delete a
buffer, change to another buffer or change the