mirror of
https://github.com/neovim/neovim.git
synced 2026-05-04 04:55:16 +00:00
vim-patch:9.1.1576: cannot easily trigger wildcard expansion (#35022)
Problem: cannot easily trigger wildcard expansion
Solution: Introduce wildtrigger() function
(Girish Palya)
This PR introduces a new `wildtrigger()` function.
See `:h wildtrigger()`
`wildtrigger()` behaves like pressing the `wildchar,` but provides a
more refined and controlled completion experience:
- Suppresses beeps when no matches are found.
- Avoids displaying irrelevant completions (like full command lists)
when the prefix is insufficient or doesn't match.
- Skips completion if the typeahead buffer has pending input or if a
wildmenu is already active.
- Does not print "..." before completion.
This is an improvement on the `feedkeys()` based autocompletion script
given in vim/vim#16759.
closes: vim/vim#17806
b486ed8266
While at it, also make Ctrl-Z trigger search completion.
Co-authored-by: Girish Palya <girishji@gmail.com>
This commit is contained in:
2
runtime/lua/vim/_meta/options.lua
generated
2
runtime/lua/vim/_meta/options.lua
generated
@@ -7865,7 +7865,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'`.
|
||||
--- See also 'wildoptions' and `wildtrigger()`.
|
||||
---
|
||||
--- @type integer
|
||||
vim.o.wildchar = 9
|
||||
|
||||
Reference in New Issue
Block a user