lifepillar / vim-mucomplete

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

'.' doesnot popup omni-menus in python omnicomplete #105

Closed liwnn closed 6 years ago

liwnn commented 6 years ago

a as in the gif, if 'os' already typed, then '.' will popups omni complete menus, but the 'os.' popups only the key complete menus. my config:

let g:mucomplete#can_complete.python = { 'omni': { t -> t =~# '\m\k\%(\k\|\.\)$' } }
lifepillar commented 6 years ago

That is an issue with Python completion, I'd say. To verify that, turn off MUcomplete with :MUcompleteAutoOff, then type: os<c-x><c-o>. A menu showing only one os entry should appear (not aligned with the word, btw). Then, type .: nothing happens and the menu stays open. IMO, the right behaviour is that the menu should close after typing ., because there is no match.

A workaround is as follows: after typing os., press CTRL-J or CTRL-H to cycle through the completion methods. This will re-trigger omni-completion and you should get the right completions.

Another option is to try some Python plugin using a different completion function, such as jedi-vim.