]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(doc): add more pointers to 'completeopt'
authorIlya Grigoriev <ilyagr@users.noreply.github.com>
Wed, 11 Jun 2025 19:07:35 +0000 (21:07 +0200)
committerChristian Brabandt <cb@256bit.org>
Wed, 11 Jun 2025 19:07:35 +0000 (21:07 +0200)
Before this commit, I had trouble finding information about configuring
the insert mode completion. In particular, it was not clear that the
'wildopt' config that I already had in my vimrc does not apply here.

Also, `insert.txt` barely mentioned 'completeopt' except when
describing popups (I was more interested in bash-like behavior
where the unique prefix of all completions is completed first).

I'm hoping these edits will make the relevant docs easier to find.

closes: #17515

Signed-off-by: Ilya Grigoriev <ilyagr@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/insert.txt
runtime/doc/options.txt

index 155eb8f13a1d59428f5561455083b4d825469b5a..da028e820ba45cda5296ebedd4a44478cbceb84e 100644 (file)
@@ -1,4 +1,4 @@
-*insert.txt*    For Vim version 9.1.  Last change: 2025 Jun 04
+*insert.txt*    For Vim version 9.1.  Last change: 2025 Jun 11
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -659,6 +659,9 @@ and one of the CTRL-X commands.  You exit CTRL-X mode by typing a key that is
 not a valid CTRL-X mode command.  Valid keys are the CTRL-X command itself,
 CTRL-N (next), and CTRL-P (previous).
 
+By default, the possible completions are showed in a menu and the first
+completion is inserted into the text. This can be adjusted with 'completeopt'.
+
 To get the current completion information, |complete_info()| can be used.
 Also see the 'infercase' option if you want to adjust the case of the match.
 
index b504688633631ea09a8a3a03eede7b6c28080b00..f4d2c26b4845376b800e83bdef8661075f4d2b6f 100644 (file)
@@ -1,4 +1,4 @@
-*options.txt*  For Vim version 9.1.  Last change: 2025 Jun 10
+*options.txt*  For Vim version 9.1.  Last change: 2025 Jun 11
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -2249,6 +2249,9 @@ A jump table for the options with a short description can be found at |Q_op|.
                    completion in the preview window.  Only works in
                    combination with "menu" or "menuone".
 
+       This option does not apply to |cmdline-completion|. See 'wildoptions'
+       for that.
+
                                        *'completepopup'* *'cpp'*
 'completepopup' 'cpp'  string (default empty)
                        global
@@ -9809,6 +9812,7 @@ A jump table for the options with a short description can be found at |Q_op|.
 'wildoptions' 'wop'    string  (default "")
                        global
        A list of words that change how |cmdline-completion| is done.
+
        The following values are supported:
          fuzzy         Use |fuzzy-matching| to find completion matches. When
                        this value is specified, wildcard expansion will not
@@ -9826,6 +9830,9 @@ A jump table for the options with a short description can be found at |Q_op|.
                                d       #define
                                f       function
 
+       This option does not apply to |ins-completion|. See 'completeopt' for
+       that.
+
                                                *'winaltkeys'* *'wak'*
 'winaltkeys' 'wak'     string  (default "menu")
                        global