1
- *options.txt* For Vim version 9.1. Last change: 2025 Sep 02
1
+ *options.txt* For Vim version 9.1. Last change: 2025 Sep 11
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2124,10 +2124,11 @@ A jump table for the options with a short description can be found at |Q_op|.
2124
2124
*'complete'* *'cpt'* *E535*
2125
2125
'complete' 'cpt' string (default: ".,w,b,u,t,i")
2126
2126
local to buffer
2127
- This option specifies how keyword completion | ins-completion | works
2128
- when CTRL-P or CTRL-N are used. It is also used for whole-line
2129
- completion | i_CTRL-X_CTRL-L | . It indicates the type of completion
2130
- and the places to scan. It is a comma-separated list of flags:
2127
+ This option controls how completion | ins-completion | behaves when
2128
+ using CTRL-P , CTRL-N , or | ins-autocompletion | . It is also used for
2129
+ whole-line completion | i_CTRL-X_CTRL-L | . It indicates the type of
2130
+ completion and the places to scan. It is a comma-separated list of
2131
+ flags:
2131
2132
. scan the current buffer ('wrapscan' is ignored)
2132
2133
w scan buffers from other windows
2133
2134
b scan other loaded buffers that are in the buffer list
@@ -2163,8 +2164,9 @@ A jump table for the options with a short description can be found at |Q_op|.
2163
2164
is especially important for | ins-autocompletion | .
2164
2165
F equivalent to using "F{func} ", where the function is taken from
2165
2166
the 'completefunc' option.
2166
- o equivalent to using "F{func} ", where the function is taken from
2167
- the 'omnifunc' option.
2167
+ o equivalent to "F{func} ", where {func} is taken from the 'omnifunc'
2168
+ option. If a plugin (such as an LSP client) defines 'omnifunc' , it
2169
+ can be used through this flag.
2168
2170
2169
2171
Unloaded buffers are not loaded, thus their autocmds | :autocmd | are
2170
2172
not executed, this may lead to unexpected completions from some files
@@ -2179,9 +2181,11 @@ A jump table for the options with a short description can be found at |Q_op|.
2179
2181
5. tags
2180
2182
6. included files
2181
2183
2182
- As you can see, CTRL-N and CTRL-P can be used to do any 'iskeyword' -
2183
- based expansion (e.g., dictionary | i_CTRL-X_CTRL-K | , included patterns
2184
- | i_CTRL-X_CTRL-I | , tags | i_CTRL-X_CTRL-] | and normal expansions).
2184
+ CTRL-N , CTRL-P , and | ins-autocompletion | can be used for any
2185
+ 'iskeyword' -based completion (dictionary | i_CTRL-X_CTRL-K | , included
2186
+ patterns | i_CTRL-X_CTRL-I | , tags | i_CTRL-X_CTRL-] | , and normal
2187
+ expansions). With the "F" and "o" flags in 'complete' , non-keywords
2188
+ can also be completed.
2185
2189
2186
2190
An optional match limit can be specified for a completion source by
2187
2191
appending a caret ("^") followed by a {count} to the source flag.
@@ -2298,17 +2302,22 @@ A jump table for the options with a short description can be found at |Q_op|.
2298
2302
{only works when compiled with the | +textprop | feature}
2299
2303
2300
2304
preinsert
2301
- Preinsert the portion of the first candidate word that is
2302
- not part of the current completion leader and using the
2303
- | hl-ComplMatchIns | highlight group. In order for it to
2304
- work, "fuzzy" must not be set and "menuone" must be set.
2305
+ When 'autocomplete' is not active, inserts the part of the
2306
+ first candidate word beyond the current completion leader,
2307
+ highlighted with | hl-PreInsert | . The cursor doesn't move.
2308
+ Requires "fuzzy" unset and "menuone" in 'completeopt' .
2309
+
2310
+ When 'autocomplete' is active, inserts the longest common
2311
+ prefix of matches (from all shown items or from the
2312
+ current buffer items). This occurs only when no menu item
2313
+ is selected. Press CTRL-Y to accept.
2305
2314
2306
2315
preview Show extra information about the currently selected
2307
2316
completion in the preview window. Only works in
2308
2317
combination with "menu" or "menuone".
2309
2318
2310
- Only "fuzzy", "popup", "popuphidden" and "preview" have an effect when
2311
- 'autocomplete' is enabled.
2319
+ Only "fuzzy", "popup", "popuphidden", "preinsert" and "preview" have
2320
+ an effect when 'autocomplete' is enabled.
2312
2321
2313
2322
This option does not apply to | cmdline-completion | . See 'wildoptions'
2314
2323
for that.
@@ -3059,7 +3068,7 @@ A jump table for the options with a short description can be found at |Q_op|.
3059
3068
3060
3069
*'dip'* *'diffopt'*
3061
3070
'diffopt' 'dip' string (default
3062
- "internal,filler,closeoff,inline:simple ")
3071
+ "internal,filler,closeoff,indent-heuristic, inline:char ")
3063
3072
global
3064
3073
{not available when compiled without the | +diff |
3065
3074
feature}
@@ -4654,7 +4663,7 @@ A jump table for the options with a short description can be found at |Q_op|.
4654
4663
#:TabLineSel,_:TabLineFill,!:CursorColumn,
4655
4664
.:CursorLine,o:ColorColumn,q:QuickFixLine,
4656
4665
z:StatusLineTerm,Z:StatusLineTermNC,
4657
- g:MsgArea,h:ComplMatchIns")
4666
+ g:MsgArea,h:ComplMatchIns,I:PreInsert ")
4658
4667
global
4659
4668
This option can be used to set highlighting mode for various
4660
4669
occasions. It is a comma-separated list of character pairs. The
@@ -4717,6 +4726,7 @@ A jump table for the options with a short description can be found at |Q_op|.
4717
4726
| hl-PmenuThumb | X popup menu scrollbar thumb
4718
4727
| hl-PmenuMatch | k popup menu matched text
4719
4728
| hl-PmenuMatchSel | < popup menu matched text in selected line
4729
+ | hl-PreInsert | I text inserted when "preinsert" is in 'completeopt'
4720
4730
4721
4731
The display modes are:
4722
4732
r reverse (termcap entry "mr" and "me")
@@ -5079,8 +5089,8 @@ A jump table for the options with a short description can be found at |Q_op|.
5079
5089
autocmd. Example: >
5080
5090
augroup vimrc-incsearch-highlight
5081
5091
autocmd!
5082
- autocmd CmdlineEnter /,\? :set hlsearch
5083
- autocmd CmdlineLeave /,\? :set nohlsearch
5092
+ autocmd CmdlineEnter [\/\?] :set hlsearch
5093
+ autocmd CmdlineLeave [\/\?] :set nohlsearch
5084
5094
augroup END
5085
5095
<
5086
5096
CTRL-L can be used to add one character from after the current match
0 commit comments