|
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 08 |
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 |
@@ -2179,9 +2180,11 @@ A jump table for the options with a short description can be found at |Q_op|. |
2179 | 2180 | 5. tags |
2180 | 2181 | 6. included files |
2181 | 2182 |
|
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). |
| 2183 | + CTRL-N, CTRL-P, and |ins-autocompletion| can be used for any |
| 2184 | + 'iskeyword'-based completion (dictionary |i_CTRL-X_CTRL-K|, included |
| 2185 | + patterns |i_CTRL-X_CTRL-I|, tags |i_CTRL-X_CTRL-]|, and normal |
| 2186 | + expansions). With the "F" and "o" flags in 'complete', non-keywords |
| 2187 | + can also be completed. |
2185 | 2188 |
|
2186 | 2189 | An optional match limit can be specified for a completion source by |
2187 | 2190 | appending a caret ("^") followed by a {count} to the source flag. |
@@ -2298,17 +2301,22 @@ A jump table for the options with a short description can be found at |Q_op|. |
2298 | 2301 | {only works when compiled with the |+textprop| feature} |
2299 | 2302 |
|
2300 | 2303 | 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. |
| 2304 | + When autocompletion is not enabled, inserts the part of the |
| 2305 | + first candidate word beyond the current completion leader, |
| 2306 | + highlighted with |hl-ComplMatchIns|. The cursor does not |
| 2307 | + move. Requires 'fuzzy' unset and 'menuone' in 'completeopt'. |
| 2308 | + |
| 2309 | + When 'autocomplete' is enabled, inserts the longest common |
| 2310 | + prefix of matches (from all shown items or buffer-specific |
| 2311 | + matches), highlighted with |hl-PreInsert|. This occurs only |
| 2312 | + when no menu item is selected. Press CTRL-Y to accept. |
2305 | 2313 |
|
2306 | 2314 | preview Show extra information about the currently selected |
2307 | 2315 | completion in the preview window. Only works in |
2308 | 2316 | combination with "menu" or "menuone". |
2309 | 2317 |
|
2310 | | - Only "fuzzy", "popup", "popuphidden" and "preview" have an effect when |
2311 | | - 'autocomplete' is enabled. |
| 2318 | + Only "fuzzy", "popup", "popuphidden", "preinsert" and "preview" have |
| 2319 | + an effect when 'autocomplete' is enabled. |
2312 | 2320 |
|
2313 | 2321 | This option does not apply to |cmdline-completion|. See 'wildoptions' |
2314 | 2322 | for that. |
@@ -4654,7 +4662,7 @@ A jump table for the options with a short description can be found at |Q_op|. |
4654 | 4662 | #:TabLineSel,_:TabLineFill,!:CursorColumn, |
4655 | 4663 | .:CursorLine,o:ColorColumn,q:QuickFixLine, |
4656 | 4664 | z:StatusLineTerm,Z:StatusLineTermNC, |
4657 | | - g:MsgArea,h:ComplMatchIns") |
| 4665 | + g:MsgArea,h:ComplMatchIns,I:PreInsert") |
4658 | 4666 | global |
4659 | 4667 | This option can be used to set highlighting mode for various |
4660 | 4668 | occasions. It is a comma-separated list of character pairs. The |
@@ -4717,6 +4725,7 @@ A jump table for the options with a short description can be found at |Q_op|. |
4717 | 4725 | |hl-PmenuThumb| X popup menu scrollbar thumb |
4718 | 4726 | |hl-PmenuMatch| k popup menu matched text |
4719 | 4727 | |hl-PmenuMatchSel| < popup menu matched text in selected line |
| 4728 | + |hl-PreInsert| I text inserted when "preinsert" and 'autocomplete' |
4720 | 4729 |
|
4721 | 4730 | The display modes are: |
4722 | 4731 | r reverse (termcap entry "mr" and "me") |
|
0 commit comments