From: Boyang Du Date: Tue, 9 Jul 2024 16:46:12 +0000 (+0200) Subject: runtime(doc): autocmd_add() accepts a list not a dict X-Git-Tag: v9.1.0549~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7298565c85b8c32dce73d782aa44581419e1fa3f;p=thirdparty%2Fvim.git runtime(doc): autocmd_add() accepts a list not a dict closes: #15180 Signed-off-by: Boyang Du Signed-off-by: Christian Brabandt --- diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index a5dce7db8f..23f1cbf92d 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 9.1. Last change: 2024 Jul 07 +*autocmd.txt* For Vim version 9.1. Last change: 2024 Jul 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -54,20 +54,20 @@ Recommended use: without the autocommand being repeated. Example in Vim9 script: > - autocmd_add({replace: true, + autocmd_add([{replace: true, group: 'DemoGroup', event: 'BufEnter', pattern: '*.txt', cmd: 'call DemoBufEnter()' - }) + }]) In legacy script: > - call autocmd_add(#{replace: v:true, + call autocmd_add([#{replace: v:true, \ group: 'DemoGroup', \ event: 'BufEnter', \ pattern: '*.txt', \ cmd: 'call DemoBufEnter()' - \ }) + \ }]) ============================================================================== 2. Defining autocommands *autocmd-define*