lifepillar / vim-mucomplete

Chained completion that works the way you want!
MIT License
912 stars 18 forks source link

Possible usability improvement #190

Open smckown opened 3 years ago

smckown commented 3 years ago

Longtime user of supertab, and I'm looking at switching to mucomplete because it has obviously better completion method chaining.

I'm a big fan of completion, especially the way the completion list, once activated, interactively updates as one adds and removes characters from the document. This makes short and fast work of lists more than a small few entries and almost always faster that riding the key to scroll through the list.

In experimenting with mucomplete I was surprised to learn that it overrides completeopt when I hit <tab> (I'm not using auto-completion). So the interactive goodness I described above --with is also usable in mucomplete when auto-completion is on, is not available.

It's not clear to me why the plugin should override completeopt at all. At least for me it seems doing so is a pretty noticeable disadvantage. But I'm a mucomplet veteran of like 15 minutes. ;)

I can see how to hack act_on_pumvisible() to solve this problem locally, but I wonder if it might be better to do something more general.

What about a configuration data structure that could be used to define completion method specific completeopt settings when the defaults aren't desirable? I guess this is in some ways attempt to parameterize the index() in act_on_pumvisible().

Is something like this workable? I'm sure there are numerous issues I'm not aware of, and various compromises at play, so perhaps this suggestion is naive or totally off the mark.

Edit: fix <tab> now showing up.

lifepillar commented 3 years ago

Does let g:mucomplete#always_use_completeopt = 1 help for your use case? See :help g:mucomplete#always_use_completeopt.