Closed psprint closed 4 years ago
Line completion is supported out of the box with the "line"
method:
:let b:mucomplete_chain = ['line']
Type:
I like biking
I like swimming
I like<Tab>
You are not supposed to use g:mucomplete#user_mappings
to (re)define built-in completion methods. That's not going to work as expected, in general. MUcomplete provides all of them, in a way that takes into account the particular way each one works. So, stick with 'line'
and 'omni'
, for line-completion and omni-completion, respectively.
In your example, the second configuration (using 'line'
) works as expected: since 'keyn'
is before 'line'
, you get keyword completions first. The first configuration (using your own 'keyl'
) does not produce the expected result (and it's not expected to do so as you are mapping a built-in method), because keyword completion should be triggered, not line completion.
If you want line completion to be given a higher priority, put it earlier in the chain, e.g., try:
:let b:mucomplete_chain= ['file', 'line', 'keyn']
As for the lag, you should check your omni-completion function and/or tags completion (which seem the ones that cause a delay in your example). For instance, to test omni-completion, disable MUcomplete auto-completion (:MUcompleteAutoOff
), then try completing by typing CTRL-X CTRL-O. For tags, try CTRL-X CTRL-]. Are those as slow?
Hi, I've tried:
However this breaks input – after entering a key it starts repeating
l
s, like so: