comparison 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
comparison
equal deleted inserted replaced
29015:0210166c162e 29016:aadeddf38d9b
936 bufnr buffer number to add a buffer-local autocmd. 936 bufnr buffer number to add a buffer-local autocmd.
937 If this item is specified, then the "pattern" 937 If this item is specified, then the "pattern"
938 item is ignored. 938 item is ignored.
939 cmd Ex command to execute for this autocmd event 939 cmd Ex command to execute for this autocmd event
940 event autocmd event name. Refer to |autocmd-events|. 940 event autocmd event name. Refer to |autocmd-events|.
941 TODO: currently only accepts one event. 941 This can be either a String with a single
942 event name or a List of event names.
942 group autocmd group name. Refer to |autocmd-groups|. 943 group autocmd group name. Refer to |autocmd-groups|.
943 If this group doesn't exist then it is 944 If this group doesn't exist then it is
944 created. If not specified or empty, then the 945 created. If not specified or empty, then the
945 default group is used. 946 default group is used.
946 nested boolean flag, set to v:true to add a nested 947 nested boolean flag, set to v:true to add a nested
948 once boolean flag, set to v:true to add an autocmd 949 once boolean flag, set to v:true to add an autocmd
949 which executes only once. Refer to 950 which executes only once. Refer to
950 |autocmd-once|. 951 |autocmd-once|.
951 pattern autocmd pattern string. Refer to 952 pattern autocmd pattern string. Refer to
952 |autocmd-patterns|. If "bufnr" item is 953 |autocmd-patterns|. If "bufnr" item is
953 present, then this item is ignored. 954 present, then this item is ignored. This can
955 be a String with a single pattern or a List of
956 patterns.
954 replace boolean flag, set to v:true to remove all the 957 replace boolean flag, set to v:true to remove all the
955 commands associated with the specified autocmd 958 commands associated with the specified autocmd
956 event and group and add the {cmd}. This is 959 event and group and add the {cmd}. This is
957 useful to avoid adding the same command 960 useful to avoid adding the same command
958 multiple times for an autocmd event in a group. 961 multiple times for an autocmd event in a group.