Closed tjharman closed 7 years ago
By design, µcomplete does not set or change any Vim options, much less global options. So, the short answer is: the user has to do it (through a custom command or mapping). For example:
fun! s:toggle_completeopt()
if exists('#MUcompleteAuto')
set completeopt+=noinsert,noselect
else
set completeopt-=noinsert,noselect
endif
endf
nnoremap <silent> coa :<c-u>MUcompleteAutoToggle<cr>:call <sid>toggle_completeopt()<cr>
Note that noinsert
is ignored in manual completion (again, by design), except for spelling suggestions.
This makes perfect sense, thank you. And thank you for the .vimrc suggestion, that'll do perfectly.
It would be nice (I think, there are probably good reasons it's not) to have completeopt's settings be toggled for you when MUcompleteAutoOff/On/Toggle is used.
For example (this is bad pseudo code)
Does this make sense? Is it a good idea, or a stupid one?