runtime(doc): Improve command-line completion docs (#13331)

* Improve command-line completion docs

Add more details about 'ignorecase' and its effect on cmdline
completion.

Make sure keys used in wildmenu are properly documented and linked in the
keys' documentation entries, and in `:h index` for proper
cross-referencing, as wildmenu popup is slightly different from
insert-mode popup menu.

* Fix docs typos

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Yee Cheng Chin
2023-10-14 02:23:45 -07:00
committed by GitHub
parent 29bb67f1be
commit 2bbd0d30ee
3 changed files with 49 additions and 19 deletions

View File

@ -4440,8 +4440,8 @@ A jump table for the options with a short description can be found at |Q_op|.
*'ignorecase'* *'ic'* *'noignorecase'* *'noic'*
'ignorecase' 'ic' boolean (default off)
global
Ignore case in search patterns. Also used when searching in the tags
file.
Ignore case in search patterns, |cmdline-completion|, when
searching in the tags file, and non-|Vim9| |expr-==|.
Also see 'smartcase' and 'tagcase'.
Can be overruled by using "\c" or "\C" in the pattern, see
|/ignorecase|.
@ -9314,29 +9314,32 @@ A jump table for the options with a short description can be found at |Q_op|.
as needed.
The "wildmenu" mode is abandoned when a key is hit that is not used
for selecting a completion.
While the "wildmenu" is active, not using the popup menu, the
following keys have special meanings:
<Left> <Right> - select previous/next match (like CTRL-P/CTRL-N)
<Down> - in filename/menu name completion: move into a
subdirectory or submenu.
While the "wildmenu" is active, the following keys have special
meanings:
CTRL-P - go to the previous entry
CTRL-N - go to the next entry
<CR> - in menu completion, when the cursor is just after a
dot: move into a submenu.
When not using the popup menu for command line completion, the
following keys have special meanings:
<Left> <Right> - select previous/next match (like CTRL-P/CTRL-N)
<Up> - in filename/menu name completion: move up into
parent directory or parent menu.
<Down> - in filename/menu name completion: move into a
subdirectory or submenu.
When using the popup menu for command line completion, the following
keys have special meanings:
<Down> - select next match (like CTRL-N)
<Up> <Down> - select previous/next match (like CTRL-P/CTRL-N)
<Left> - in filename/menu name completion: move up into
parent directory or parent menu.
<Right> - in filename/menu name completion: move into a
subdirectory or submenu.
<Up> - select previous match (like CTRL-P)
<PageUp> - Select a match several entries back, but don't insert it.
<PageDown> - Select a match several entries further, but don't insert it.
CTRL-E - end completion, go back to what was there before
selecting a match.
CTRL-N - go to the next entry
CTRL-P - go to the previous entry
CTRL-Y - accept the currently selected match and stop
completion.