diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2022-05-19 10:31:47 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-19 10:31:47 +0100 |
commit | 1755a91851f7022fdd3eecfbd2cc0b508a2f2a8f (patch) | |
tree | d0b3e630953275b71ee1a97a9bdfa55912b19415 /runtime/doc/autocmd.txt | |
parent | aaadb5b6f76ea03e5eb460121f3dbf46ad04ce50 (diff) |
patch 8.2.4981: it is not possible to manipulate autocommandsv8.2.4981
Problem: It is not possible to manipulate autocommands.
Solution: Add functions to add, get and set autocommands. (Yegappan
Lakshmanan, closes #10291)
Diffstat (limited to 'runtime/doc/autocmd.txt')
-rw-r--r-- | runtime/doc/autocmd.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 0bbfd34a72..fb4532fc4e 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -82,6 +82,9 @@ triggered. /<start } +The |autocmd_add()| function can be used to add a list of autocmds and autocmd +groups from a Vim script. + Note: The ":autocmd" command can only be followed by another command when the '|' appears where the pattern is expected. This works: > :augroup mine | au! BufRead | augroup END @@ -146,6 +149,9 @@ prompt. When one command outputs two messages this can happen anyway. ============================================================================== 3. Removing autocommands *autocmd-remove* +In addition to the below described commands, the |autocmd_delete()| function can +be used to remove a list of autocmds and autocmd groups from a Vim script. + :au[tocmd]! [group] {event} {aupat} [++once] [++nested] {cmd} Remove all autocommands associated with {event} and {aupat}, and add the command {cmd}. @@ -198,6 +204,9 @@ argument behavior differs from that for defining and removing autocommands. In order to list buffer-local autocommands, use a pattern in the form <buffer> or <buffer=N>. See |autocmd-buflocal|. +The |autocmd_get()| function can be used from a Vim script to get a list of +autocmds. + *:autocmd-verbose* When 'verbose' is non-zero, listing an autocommand will also display where it was last defined. Example: > |