Skip to content

Commit

Permalink
runtime(doc): autocmd_add() accepts a list not a dict
Browse files Browse the repository at this point in the history
closes: #15180

Signed-off-by: Boyang Du <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
  • Loading branch information
Boyang Du authored and chrisbra committed Jul 9, 2024
1 parent c8e158b commit 7298565
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions runtime/doc/autocmd.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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*
Expand Down

0 comments on commit 7298565

Please sign in to comment.