mirror of
https://github.com/vim/vim
synced 2025-07-15 16:51:57 +00:00
patch 9.1.1526: completion: search completion match may differ in case
Problem: completion: search completion match may differ in case (techntools) Solution: add "exacttext" to 'wildoptions' value (Girish Palya) This flag does the following: exacttext When this flag is present, search pattern completion (e.g., in |/|, |?|, |:s|, |:g|, |:v|, and |:vim|) shows exact buffer text as menu items, without preserving regex artifacts like position anchors (e.g., |/\<|). This provides more intuitive menu items that match the actual buffer text. However, searches may be less accurate since the pattern is not preserved exactly. By default, Vim preserves the typed pattern (with anchors) and appends the matched word. This preserves search correctness, especially when using regular expressions or with 'smartcase' enabled. However, the case of the appended matched word may not exactly match the case of the word in the buffer. fixes: #17654 closes: #17667 Signed-off-by: Girish Palya <girishji@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
b3eaae21b9
commit
93c2d5bf7f
@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 9.1. Last change: 2025 Jul 05
|
||||
*options.txt* For Vim version 9.1. Last change: 2025 Jul 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -9759,6 +9759,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
< 'wildchar' also enables completion in search pattern contexts such as
|
||||
|/|, |?|, |:s|, |:g|, |:v|, and |:vim|. To insert a literal <Tab>
|
||||
instead of triggering completion, type <C-V><Tab> or "\t".
|
||||
See also |'wildoptions'|.
|
||||
NOTE: This option is set to the Vi default value when 'compatible' is
|
||||
set and to the Vim default value when 'compatible' is reset.
|
||||
|
||||
@ -9926,6 +9927,20 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
A list of words that change how |cmdline-completion| is done.
|
||||
|
||||
The following values are supported:
|
||||
exacttext When this flag is present, search pattern completion
|
||||
(e.g., in |/|, |?|, |:s|, |:g|, |:v|, and |:vim|)
|
||||
shows exact buffer text as menu items, without
|
||||
preserving regex artifacts like position
|
||||
anchors (e.g., |/\<|). This provides more intuitive
|
||||
menu items that match the actual buffer text.
|
||||
However, searches may be less accurate since the
|
||||
pattern is not preserved exactly.
|
||||
By default, Vim preserves the typed pattern (with
|
||||
anchors) and appends the matched word. This preserves
|
||||
search correctness, especially when using regular
|
||||
expressions or with 'smartcase' enabled. However, the
|
||||
case of the appended matched word may not exactly
|
||||
match the case of the word in the buffer.
|
||||
fuzzy Use |fuzzy-matching| to find completion matches. When
|
||||
this value is specified, wildcard expansion will not
|
||||
be used for completion. The matches will be sorted by
|
||||
|
@ -1,4 +1,4 @@
|
||||
*version9.txt* For Vim version 9.1. Last change: 2025 Jul 05
|
||||
*version9.txt* For Vim version 9.1. Last change: 2025 Jul 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -41623,6 +41623,8 @@ Completion: ~
|
||||
- improved commandline completion for the |:hi| command
|
||||
- New option value for 'wildmode':
|
||||
"noselect" - do not auto select an entry in the wildmenu
|
||||
"exacttext" - show exact matches in wildmenu with search
|
||||
completion
|
||||
- New flags for 'complete':
|
||||
"F{func}" - complete using given function
|
||||
"F" - complete using 'completefunc'
|
||||
|
Reference in New Issue
Block a user