Home Explore Blog CI



neovim

7th chunk of `runtime/doc/cmdline.txt`
b0668d587f815cca113766bb82312f1a71acc3f04ba0c6140000000100000fa5
 displayed then CTRL-T will move
		to the previous match (does not take |search-offset| into
		account).
		Use CTRL-G to move to the next match.  Hint: on a regular
		keyboard T is above G.

The 'wildchar' option defaults to <Tab> (CTRL-E when in Vi compatible mode; in
a previous version <Esc> was used).  In the pattern standard |wildcards| are
accepted when matching file names.

When repeating 'wildchar' or CTRL-N you cycle through the matches, eventually
ending up back to what was typed.  If the first match is not what you wanted,
you can use <S-Tab> or CTRL-P to go straight back to what you typed.

The 'wildmenu' option can be set to show the matches just above the command
line.

The 'wildoptions' option provides additional configuration to use a popup menu
for 'wildmenu', and to use fuzzy matching.

The 'wildignorecase' option can be set to ignore case in filenames.  For
completing other texts (e.g. command names), the 'ignorecase' option is used
instead (fuzzy matching always ignores case, however).

If you like tcsh's autolist completion, you can use this mapping: >
	:cnoremap X <C-L><C-D>
(Where X is the command key to use, <C-L> is CTRL-L and <C-D> is CTRL-D)
This will find the longest match and then list all matching files.

If you like tcsh's autolist completion, you can use the 'wildmode' option to
emulate it.  For example, this mimics autolist=ambiguous: >
	:set wildmode=longest,list
This will find the longest match with the first 'wildchar', then list all
matching files with the next.

					*complete-script-local-functions*
When completing user function names, prepend "s:" to find script-local
functions.

							*suffixes*
For file name completion you can use the 'suffixes' option to set a priority
between files with almost the same name.  If there are multiple matches,
those files with an extension that is in the 'suffixes' option are ignored.
The default is ".bak,~,.o,.h,.info,.swp,.obj", which means that files ending
in ".bak", "~", ".o", ".h", ".info", ".swp" and ".obj" are sometimes ignored.

An empty entry, two consecutive commas, match a file name that does not
contain a ".", thus has no suffix.  This is useful to ignore "prog" and prefer
"prog.c".

Examples:

  pattern:	files:				match:	~
   test*	test.c test.h test.o		test.c
   test*	test.h test.o			test.h and test.o
   test*	test.i test.h test.c		test.i and test.c

It is impossible to ignore suffixes with two dots.

If there is more than one matching file (after ignoring the ones matching
the 'suffixes' option) the first file name is inserted.  You can see that
there is only one match when you type 'wildchar' twice and the completed
match stays the same.  You can get to the other matches by entering
'wildchar', CTRL-N or CTRL-P.  All files are included, also the ones with
extensions matching the 'suffixes' option.

To completely ignore files with some extension use 'wildignore'.

To match only files that end at the end of the typed text append a "$".  For
example, to match only files that end in ".c": >
	:e *.c$
This will not match a file ending in ".cpp".  Without the "$" it does match.

If you would like using <S-Tab> for CTRL-P in an xterm, put this command in
your .cshrc: >
	xmodmap -e "keysym Tab = Tab Find"
And this in your vimrc: >
	:cmap <Esc>[1~ <C-P>
<						*complete-set-option*
When setting an option using |:set=|, the old value of an option can be
obtained by hitting 'wildchar' just after the '='.  For example, typing
'wildchar' after ":set dir=" will insert the current value of 'dir'.  This
overrules file name completion for the options that take a file name.

When using |:set=|, |:set+=|, or |:set^=|, string options that have
pre-defined names or syntax (e.g. 'diffopt', 'listchars') or are a list of
single-character flags (e.g. 'shortmess') will also present a list of possible
values for completion when using 'wildchar'.

When using |:set-=|, comma-separated options like 'diffopt' or 'backupdir'
will show each item separately.  Flag list options

Title: Vim Completion Customization and Advanced Features
Summary
This section explains how to customize Vim's completion behavior using options like 'wildchar', 'wildmenu', 'wildoptions', and 'wildignorecase'. It also discusses how to emulate tcsh's autolist completion with 'wildmode' and provides a mapping example. The section covers script-local function completion, the role of the 'suffixes' option in prioritizing files, and the use of '$' to match only files ending with a specific extension. Finally, it details how to use <S-Tab> for CTRL-P in an xterm and how to complete option values after ":set=".