]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1576: cannot easily trigger wildcard expansion v9.1.1576
authorGirish Palya <girishji@gmail.com>
Mon, 21 Jul 2025 19:26:32 +0000 (21:26 +0200)
committerChristian Brabandt <cb@256bit.org>
Mon, 21 Jul 2025 19:26:32 +0000 (21:26 +0200)
commitb486ed8266d3b8cd1ffab7d7f302fbd6d5a55c70
tree5f5d8f565f35ffc6627b4a696e4c905130282fde
parent689f3bf3139bf8124adfa4bea3d4d8a438b9feb2
patch 9.1.1576: cannot easily trigger wildcard expansion

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 #16759.

closes: #17806

Signed-off-by: Girish Palya <girishji@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
15 files changed:
runtime/doc/builtin.txt
runtime/doc/cmdline.txt
runtime/doc/options.txt
runtime/doc/tags
runtime/doc/usr_41.txt
runtime/doc/version9.txt
runtime/syntax/vim.vim
src/cmdexpand.c
src/evalfunc.c
src/ex_getln.c
src/keymap.h
src/proto/ex_getln.pro
src/testdir/test_cmdline.vim
src/version.c
src/vim.h