|i_CTRL-X_CTRL-U|
See |complete-functions| for an explanation of how the function is
invoked and what it should return. The value can be the name of a
function, a |lambda| or a |Funcref|. See |option-value-function| for
more information.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'completefuzzycollect'* *'cfc'*
'completefuzzycollect' 'cfc' string (default "")
global
A comma-separated list of strings to enable fuzzy collection for
specific |ins-completion| modes, affecting how matches are gathered
during completion. For specified modes, fuzzy matching is used to
find completion candidates instead of the standard prefix-based
matching. This option can contain the following values:
keyword keywords in the current file |i_CTRL-X_CTRL-N|
keywords with flags ".", "w", |i_CTRL-N| |i_CTRL-P|
"b", "u", "U" and "k{dict}" in 'complete'
keywords in 'dictionary' |i_CTRL-X_CTRL-K|
files file names |i_CTRL-X_CTRL-F|
whole_line whole lines |i_CTRL-X_CTRL-L|
When using the 'completeopt' "longest" option value, fuzzy collection
can identify the longest common string among the best fuzzy matches
and insert it automatically.
*'completeitemalign'* *'cia'*
'completeitemalign' 'cia' string (default "abbr,kind,menu")
global
A comma-separated list of strings that controls the alignment and
display order of items in the popup menu during Insert mode
completion. The supported values are "abbr", "kind", and "menu".
These values allow customizing how |complete-items| are shown in the
popup menu. Note: must always contain those three values in any
order.
*'completeopt'* *'cot'*
'completeopt' 'cot' string (default "menu,popup")
global or local to buffer |global-local|
A comma-separated list of options for Insert mode completion
|ins-completion|. The supported values are:
fuzzy Enable |fuzzy-matching| for completion candidates. This
allows for more flexible and intuitive matching, where
characters can be skipped and matches can be found even
if the exact sequence is not typed. Note: This option
does not affect the collection of candidate list, it only
controls how completion candidates are reduced from the
list of alternatives. If you want to use |fuzzy-matching|
to gather more alternatives for your candidate list,
see |'completefuzzycollect'|.
longest Only insert the longest common text of the matches. If
the menu is displayed you can use CTRL-L to add more
characters. Whether case is ignored depends on the kind
of completion. For buffer text the 'ignorecase' option is
used.
menu Use a popup menu to show the possible completions. The
menu is only shown when there is more than one match and
sufficient colors are available. |ins-completion-menu|
menuone Use the popup menu also when there is only one match.
Useful when there is additional information about the
match, e.g., what file it comes from.
nearest Matches are listed based on their proximity to the cursor
position, unlike the default behavior, which only
considers proximity for matches appearing below the
cursor. This applies only to matches from the current
buffer. No effect if "fuzzy" is present.
noinsert Do not insert any text for a match until the user selects
a match from the menu. Only works in combination with
"menu" or "menuone". No effect if "longest" is present.
noselect Same as "noinsert", except that no menu item is
pre-selected. If both "noinsert" and "noselect" are
present, "noselect" has precedence.
nosort Disable sorting of completion candidates based on fuzzy
scores when "fuzzy" is enabled. Candidates will appear
in their original order.
popup Show extra information about the currently selected
completion in a popup window. Only works