Buffer fuzzy matching not handling dash well, for it splits words differently compared with "case" and "icase" matching
I encountered this issue when writing Powershell, which uses dash in function and cmdlet names such as "Set-Location".
For buffer words matching, when I use the default "icase" matching, words with dashes will be treated as a single whole word.
However, when I switch to use fuzzy search, words with dashes are split into different words.
Worse still is that no candidate is shown after hitting dash.
I took a look at the buffer.vim and it seems that the root cause is that, for fuzzy matching, a different function is used to generate the list of candidate words, the BufWords(). And in that function, the regex '\W\+' is used to split a buffer line, which treats dash as 'non-word' characters.
I think it'll be better to align the way words are split in different completion matcher options.
I'm considering ending active maintenance of this plugin. Recently, I’ve been contributing new features directly to Vim's source code to improve its built-in auto-completion capabilities. These changes focus on enabling completion from user-defined functions, prioritizing relevant matches, and allowing match limits for specific completion sources.
You can follow the progress in these (unmerged) pull requests:
- https://github.com/vim/vim/pull/17065
- https://github.com/vim/vim/pull/17076
- https://github.com/vim/vim/pull/17087
With these enhancements to Vim itself, this plugin may no longer be necessary—or at most, a minimal plugin might suffice to provide a few completion functions. Hopefully, the overall completion experience in Vim will be significantly improved as a result.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.