]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(doc): autocmd_add() accepts a list not a dict
authorBoyang Du <boyang@synopsys.com>
Tue, 9 Jul 2024 16:46:12 +0000 (18:46 +0200)
committerChristian Brabandt <cb@256bit.org>
Tue, 9 Jul 2024 16:47:09 +0000 (18:47 +0200)
closes: #15180

Signed-off-by: Boyang Du <boyang@synopsys.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/autocmd.txt

index a5dce7db8f5379d73d70defda3c37d1c35118570..23f1cbf92d1a9c5f4680614ea8bd3992c10cb94a 100644 (file)
@@ -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*