Add immedsort
(whatever name) for completeopt
to allow fuzzy sorting when the completion menu first opens.
Is your feature request about something that is currently impossible or hard to do? Please describe the problem.
Currently, fuzzy sorting doesn't occur when the completion menu first opens. From @girishji mentioned in #17469, this appears to be deliberately designed.
The current design is acceptable with autocomplete
enabled. However, for users who prefer manual completion, the fuzzy completion experience is much worse compared to before prefix completion.
It is possible to write Vimscript to bypass this issue. But, this is not something the user should have to consider, as adding this new option is merely a compromise regarding the previous non-mainstream fuzzy completion design.
In summary:
Describe the solution you'd like
set cot+=immedsort
Describe alternatives you've considered
" Temporary solution function! s:self_inscompletion_ctrl_n() let curpos = col('.') let beforechar = (curpos > 1) ? getline('.')[curpos - 2] : '' let prebeforechar = (curpos > 2) ? getline('.')[curpos - 3] : '' if pumvisible() return "\<Down>" endif if curpos <= 2 || prebeforechar == ' ' return "\<C-n>" endif return "\<C-n>\<BS>" .. beforechar endfunction
Additional context
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Will this help: :set completefuzzycollect=keyword
?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Will this help: :set completefuzzycollect=keyword?
No help.
Video
https://github.com/user-attachments/assets/fa7d0cb1-5a7a-4e36-816f-259b02d1d994
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
I think the menu items should be sorted from the start — it just feels off when they aren’t sorted as soon as the user types a letter.
@habamax, didn’t you post discussion about fuzzy collection vs. filtering? Do you have the link to that?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
I can only recall discussions around completefuzzycollect, and I agree that if fuzzy is enabled it should be applied everywhere where fuzzy makes sense/possible to implement.
But apparently there were ppl who prefers fuzzy to filter only, not for candidates collection.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Maybe the old fuzzy algorithm was the issue.
This sounds intuitive to me:
cot=fuzzy
means candidates are gathered and sorted by fuzzy score by default.:set cfc=
.—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Maybe the old fuzzy algorithm was the issue.
This sounds intuitive to me:
* `cot=fuzzy` means candidates are gathered and sorted by fuzzy score by default. * If someone prefers non-fuzzy collection, they can do `:set cfc=`.
That is the way I prefer too.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Closed #18488 as completed via 10aa04e.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.