0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

runtime(doc): Update autocmd examples for command line autocompletion

In Windows [/] should be escaped [\/]:

	autocmd CmdlineChanged [:\/\?] call wildtrigger()

This updated example works both in Linux and Windows.

closes: #18262

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Maxim Kim
2025-09-10 11:38:04 -04:00
committed by Christian Brabandt
parent b2c8848055
commit 5a9ef93b2c

View File

@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 9.1. Last change: 2025 Sep 08
*cmdline.txt* For Vim version 9.1. Last change: 2025 Sep 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1350,7 +1350,7 @@ automatically showing a popup menu of suggestions as you type, whether
searching (/ or ?) or entering commands (:).
A basic setup is: >
autocmd CmdlineChanged [:/\?] call wildtrigger()
autocmd CmdlineChanged [:\/\?] call wildtrigger()
set wildmode=noselect:lastused,full
set wildoptions=pum
@@ -1363,8 +1363,8 @@ To retain normal command-line history navigation with <Up>/<Down>: >
Options can also be applied only for specific command-lines. For
example, to use a shorter popup menu height only during search: >
autocmd CmdlineEnter [/\?] set pumheight=8
autocmd CmdlineLeave [/\?] set pumheight&
autocmd CmdlineEnter [\/\?] set pumheight=8
autocmd CmdlineLeave [\/\?] set pumheight&
EXTRAS *fuzzy-file-picker* *live-grep*