Mercurial > vim
diff runtime/doc/builtin.txt @ 29016:aadeddf38d9b v8.2.5030
patch 8.2.5030: autocmd_add() can only handle one event and pattern
Commit: https://github.com/vim/vim/commit/e0ff3a7de6030b73d94121626deb8229e66e82b2
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Fri May 27 18:05:33 2022 +0100
patch 8.2.5030: autocmd_add() can only handle one event and pattern
Problem: autocmd_add() can only handle one event and pattern.
Solution: Support a list of events and patterns. (Yegappan Lakshmanan,
closes #10483)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 27 May 2022 19:15:03 +0200 |
parents | 644b0f0541de |
children | 9f25e0ed831d |
line wrap: on
line diff
--- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -938,7 +938,8 @@ autocmd_add({acmds}) *autocmd_add()* item is ignored. cmd Ex command to execute for this autocmd event event autocmd event name. Refer to |autocmd-events|. - TODO: currently only accepts one event. + This can be either a String with a single + event name or a List of event names. group autocmd group name. Refer to |autocmd-groups|. If this group doesn't exist then it is created. If not specified or empty, then the @@ -950,7 +951,9 @@ autocmd_add({acmds}) *autocmd_add()* |autocmd-once|. pattern autocmd pattern string. Refer to |autocmd-patterns|. If "bufnr" item is - present, then this item is ignored. + present, then this item is ignored. This can + be a String with a single pattern or a List of + patterns. replace boolean flag, set to v:true to remove all the commands associated with the specified autocmd event and group and add the {cmd}. This is