Closed reckoner closed 6 years ago
Does it work when you turn auto-completion off and use Tab instead? Does let g:MultiWordComplete_FindStartMark=''
help? You might also want to define g:mucomplete#can_complete
to avoid triggering completion after just one character, e.g.:
let g:mucomplete#can_complete = { 'default': {} }
" Trigger after two keyword characters
let g:mucomplete#can_complete.default.mwc = { t -> g:mucomplete_with_key || t =~# '\m\k\k$' }
But please, first of all make sure that MWC does what you expect when you invoke it directly. For example, after playing a bit with it I have found that when I type this in an empty buffer:
ops per sec
ops<c-x>w<c-e><c-x>w
the first <c-x>w
triggers completion correctly, but the second <c-x>w
does not trigger anything. This behaviour does not seem correct to me, and it is surely disappointing for µcomplete :/
Also, try the following, which simulates what µcomplete does when auto-completing (assuming that completion is triggered after two characters). Make sure auto-completion is off, and type this in a new session:
ops per sec
op<c-x>w s pe<c-w>x
After typing op<c-x>w
, MWC offers to complete with ops per
. If you continue typing, after pressing Space the menu is correctly dismissed because nothing matches. If you go on and type pe<c-w>x
, MWC deletes pe
. This shouldn't happen. If you type the same with auto-completion on, the effect is that you see the text disappearing while your are typing. This is a problem with MWC, not µcomplete.
Given how it works, I am not sure that it makes sense to use MWC with autocompletion on. It is probably better to enable it only on manual completion (see :help mucomplete-tips
for an example of how to do that).
Thanks for checking into it. I'll set it up for manual completion.
I am trying to get this working with MultiWordComplete by doing the following in my vimrc:
but this doesn't work. Note that
completefunc
is set byMultiWordComplete
as the following:Any help appreciated.