diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-16 14:46:06 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-16 14:46:06 +0000 |
commit | fd31be29b8220ee1cb0b3460c82f2634ae3cc370 (patch) | |
tree | 93ad5a4e32bbbbd52b42226ffdf05c4b03f10b6e /runtime/doc/autocmd.txt | |
parent | c81e9bf4f07d350b860b934aa6bf0c2a7c91d07e (diff) | |
download | vim-git-fd31be29b8220ee1cb0b3460c82f2634ae3cc370.tar.gz |
Update runtime files
Diffstat (limited to 'runtime/doc/autocmd.txt')
-rw-r--r-- | runtime/doc/autocmd.txt | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index c1aee0ef8..96a0e4b00 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 Nov 20 +*autocmd.txt* For Vim version 8.2. Last change: 2022 Jan 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -51,10 +51,10 @@ 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} {aupat} [++once] [++nested] {cmd} Add {cmd} to the list of commands that Vim will execute automatically on {event} for a file matching - {pat} |autocmd-patterns|. + {aupat} |autocmd-patterns|. Here {event} cannot be "*". *E1155* Note: A quote character is seen as argument to the :autocmd and won't start a comment. @@ -145,19 +145,19 @@ 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} {aupat} [++once] [++nested] {cmd} Remove all autocommands associated with {event} and - {pat}, and add the command {cmd}. + {aupat}, and add the command {cmd}. See |autocmd-once| for [++once]. See |autocmd-nested| for [++nested]. -:au[tocmd]! [group] {event} {pat} +:au[tocmd]! [group] {event} {aupat} Remove all autocommands associated with {event} and - {pat}. + {aupat}. -:au[tocmd]! [group] * {pat} - Remove all autocommands associated with {pat} for all - events. +:au[tocmd]! [group] * {aupat} + Remove all autocommands associated with {aupat} for + all events. :au[tocmd]! [group] {event} Remove ALL autocommands for {event}. @@ -177,12 +177,12 @@ with ":augroup"); otherwise, Vim uses the group defined with [group]. ============================================================================== 4. Listing autocommands *autocmd-list* -:au[tocmd] [group] {event} {pat} +:au[tocmd] [group] {event} {aupat} Show the autocommands associated with {event} and - {pat}. + {aupat}. -:au[tocmd] [group] * {pat} - Show the autocommands associated with {pat} for all +:au[tocmd] [group] * {aupat} + Show the autocommands associated with {aupat} for all events. :au[tocmd] [group] {event} @@ -1311,16 +1311,16 @@ WinNew When a new window was created. Not done for Before a WinEnter event. ============================================================================== -6. Patterns *autocmd-patterns* *{pat}* +6. Patterns *autocmd-patterns* *{aupat}* -The {pat} argument can be a comma separated list. This works as if the -command was given with each pattern separately. Thus this command: > +The {aupat} argument of `:autocmd` can be a comma separated list. This works as +if the command was given with each pattern separately. Thus this command: > :autocmd BufRead *.txt,*.info set et Is equivalent to: > :autocmd BufRead *.txt set et :autocmd BufRead *.info set et -The file pattern {pat} is tested for a match against the file name in one of +The file pattern {aupat} is tested for a match against the file name in one of two ways: 1. When there is no '/' in the pattern, Vim checks for a match against only the tail part of the file name (without its leading directory path). |