mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
runtime(doc): Improve 'wildmode' setting desciption
closes: #17100 Signed-off-by: Girish Palya <girishji@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
bc27b6e34f
commit
eded33621b
@ -9638,55 +9638,65 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
*'wildmode'* *'wim'*
|
*'wildmode'* *'wim'*
|
||||||
'wildmode' 'wim' string (Vim default: "full")
|
'wildmode' 'wim' string (Vim default: "full")
|
||||||
global
|
global
|
||||||
Completion mode that is used for the character specified with
|
Completion mode used for the character specified with 'wildchar'.
|
||||||
'wildchar'. It is a comma-separated list of up to four parts. Each
|
This option is a comma-separated list of up to four parts,
|
||||||
part specifies what to do for each consecutive use of 'wildchar'. The
|
corresponding to the first, second, third, and fourth presses of
|
||||||
first part specifies the behavior for the first use of 'wildchar',
|
'wildchar'. Each part is a colon-separated list of completion
|
||||||
The second part for the second use, etc.
|
behaviors, which are applied simultaneously during that phase.
|
||||||
|
|
||||||
Each part consists of a colon separated list consisting of the
|
The possible behavior values are:
|
||||||
following possible values:
|
"" Only complete (insert) the first match. No further
|
||||||
"" Complete only the first match.
|
matches are cycled or listed.
|
||||||
"full" Complete the next full match. After the last match,
|
"full" Complete the next full match. Cycles through all
|
||||||
the original string is used and then the first match
|
matches, returning to the original input after the
|
||||||
again. Will also start 'wildmenu' if it is enabled.
|
last match. If 'wildmenu' is enabled, it will be
|
||||||
"longest" Complete till longest common string. If this doesn't
|
shown.
|
||||||
result in a longer string, use the next part.
|
"longest" Complete to the longest common substring. If this
|
||||||
"list" When more than one match, list all matches.
|
doesn't extend the input, the next 'wildmode' part is
|
||||||
"lastused" When completing buffer names and more than one buffer
|
used.
|
||||||
matches, sort buffers by time last used (other than
|
"list" If multiple matches are found, list all of them.
|
||||||
the current buffer).
|
"lastused" When completing buffer names, sort them by most
|
||||||
"noselect" Do not pre-select first menu item and start 'wildmenu'
|
recently used (excluding the current buffer). Only
|
||||||
if it is enabled.
|
applies to buffer name completion.
|
||||||
When there is only a single match, it is fully completed in all cases
|
"noselect" If 'wildmenu' is enabled, show the menu but do not
|
||||||
except when "noselect" is present.
|
preselect the first item.
|
||||||
|
If only one match exists, it is completed fully—unless "noselect" is
|
||||||
|
specified.
|
||||||
|
|
||||||
Examples of useful colon-separated values:
|
Some useful combinations of colon-separated values:
|
||||||
"longest:full" Like "longest", but also start 'wildmenu' if it is
|
"longest:full" Start with the longest common string and show
|
||||||
enabled. Will not complete to the next full match.
|
'wildmenu' (if enabled). Does not cycle
|
||||||
"list:full" When more than one match, list all matches and
|
through full matches.
|
||||||
complete first match.
|
"list:full" List all matches and complete first match.
|
||||||
"list:longest" When more than one match, list all matches and
|
"list:longest" List all matches and complete till the longest
|
||||||
complete till longest common string.
|
common prefix.
|
||||||
"list:lastused" When more than one buffer matches, list all matches
|
"list:lastused" List all matches. When completing buffers,
|
||||||
and sort buffers by time last used (other than the
|
sort them by most recently used (excluding the
|
||||||
|
current buffer).
|
||||||
|
"noselect:lastused" Do not preselect the first item in 'wildmenu'
|
||||||
|
if it is active. When completing buffers,
|
||||||
|
sort them by most recently used (excluding the
|
||||||
current buffer).
|
current buffer).
|
||||||
|
|
||||||
Examples: >
|
Examples: >
|
||||||
:set wildmode=full
|
:set wildmode=full
|
||||||
< Complete first full match, next match, etc. (the default) >
|
< Complete full match on every press (default behavior) >
|
||||||
:set wildmode=longest,full
|
:set wildmode=longest,full
|
||||||
< Complete longest common string, then each full match >
|
< First press: longest common substring
|
||||||
|
Second press: cycle through full matches >
|
||||||
:set wildmode=list:full
|
:set wildmode=list:full
|
||||||
< List all matches and complete each full match >
|
< First press: list all matches and complete the first one >
|
||||||
:set wildmode=list,full
|
:set wildmode=list,full
|
||||||
< List all matches without completing, then each full match >
|
< First press: list matches only
|
||||||
|
Second press: complete full matches >
|
||||||
:set wildmode=longest,list
|
:set wildmode=longest,list
|
||||||
< Complete longest common string, then list alternatives >
|
< First press: longest common substring
|
||||||
|
Second press: list all matches >
|
||||||
:set wildmode=noselect:full
|
:set wildmode=noselect:full
|
||||||
< Display 'wildmenu' without completing, then each full match >
|
< Show 'wildmenu' without completing or selecting on first press
|
||||||
|
Cycle full matches on second press >
|
||||||
:set wildmode=noselect:lastused,full
|
:set wildmode=noselect:lastused,full
|
||||||
< Same as above, but sort buffers by time last used.
|
< Same as above, but buffer matches are sorted by last used
|
||||||
More info here: |cmdline-completion|.
|
More info here: |cmdline-completion|.
|
||||||
|
|
||||||
*'wildoptions'* *'wop'*
|
*'wildoptions'* *'wop'*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user