diff options
Diffstat (limited to 'runtime/doc/autocmd.txt')
-rw-r--r-- | runtime/doc/autocmd.txt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index b0b36271e9..4372342c02 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -40,7 +40,7 @@ effects. Be careful not to destroy your text. 2. Defining autocommands *autocmd-define* *:au* *:autocmd* -:au[tocmd] [group] {event} {pat} [-once] [-nested] {cmd} +:au[tocmd] [group] {event} {pat} [++once] [++nested] {cmd} Add {cmd} to the list of commands that Vim will execute automatically on {event} for a file matching {pat} |autocmd-patterns|. @@ -48,9 +48,9 @@ effects. Be careful not to destroy your text. :autocmd and won't start a comment. Nvim always adds {cmd} after existing autocommands so they execute in the order in which they were defined. - See |autocmd-nested| for [-nested]. + See |autocmd-nested| for [++nested]. *autocmd-once* - If [-once] is supplied the command is executed once, + If [++once] is supplied the command is executed once, then removed ("one shot"). The special pattern <buffer> or <buffer=N> defines a buffer-local autocommand. @@ -119,11 +119,11 @@ prompt. When one command outputs two messages this can happen anyway. ============================================================================== 3. Removing autocommands *autocmd-remove* -:au[tocmd]! [group] {event} {pat} [-once] [-nested] {cmd} +:au[tocmd]! [group] {event} {pat} [++once] [++nested] {cmd} Remove all autocommands associated with {event} and {pat}, and add the command {cmd}. - See |autocmd-once| for [-once]. - See |autocmd-nested| for [-nested]. + See |autocmd-once| for [++once]. + See |autocmd-nested| for [++nested]. :au[tocmd]! [group] {event} {pat} Remove all autocommands associated with {event} and @@ -1446,9 +1446,9 @@ instead of ":q!". *autocmd-nested* *E218* By default, autocommands do not nest. If you use ":e" or ":w" in an autocommand, Vim does not execute the BufRead and BufWrite autocommands for -those commands. If you do want this, use the "-nested" flag for those +those commands. If you do want this, use the "++nested" flag for those commands in which you want nesting. For example: > - :autocmd FileChangedShell *.c -nested e! + :autocmd FileChangedShell *.c ++nested e! The nesting is limited to 10 levels to get out of recursive loops. It's possible to use the ":au" command in an autocommand. This can be a |