runtime(doc): autocmd_add() accepts a list not a dict
Commit:
https://github.com/vim/vim/commit/7298565c85b8c32dce73d782aa44581419e1fa3f
Author: Boyang Du <[email protected]>
Date: Tue Jul 9 18:46:12 2024 +0200
runtime(doc): autocmd_add() accepts a list not a dict
closes: https://github.com/vim/vim/issues/15180
Signed-off-by: Boyang Du <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index a5dce7db8..23f1cbf92 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*
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/E1sRECD-00DHxb-Hc%40256bit.org.