mirror of
https://github.com/neovim/neovim
synced 2025-07-15 16:51:49 +00:00
vim-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: vim/vim#17654
closes: vim/vim#17667
93c2d5bf7f
Co-authored-by: Girish Palya <girishji@gmail.com>
This commit is contained in:
@ -7173,6 +7173,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'|.
|
||||
|
||||
*'wildcharm'* *'wcm'*
|
||||
'wildcharm' 'wcm' number (default 0)
|
||||
@ -7319,6 +7320,20 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global
|
||||
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
|
||||
|
15
runtime/lua/vim/_meta/options.lua
generated
15
runtime/lua/vim/_meta/options.lua
generated
@ -7818,6 +7818,7 @@ vim.go.ww = vim.go.whichwrap
|
||||
--- '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'`.
|
||||
---
|
||||
--- @type integer
|
||||
vim.o.wildchar = 9
|
||||
@ -8012,6 +8013,20 @@ vim.go.wim = vim.go.wildmode
|
||||
|
||||
--- 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
|
||||
|
Reference in New Issue
Block a user