It used to work when I used python2, but now I can't use
^X^O to complete function names.
I do have vim with
+python3 (on Ubuntu 16.04), but here is the error I get when trying Ctrl-X Ctrl-O:
Error: Required vim compiled with +python E117: Unknown function : pythoncomplete#Complete Press ENTER or type command to continue
How can I get a working python3-completion in Vim? Thanks a lot.
I don't want to use any completion plugin, since this is supposed to work with normal vim. I have looked at this question, but no answer helps.
Checking where omnifunc was defined with
verbose set omnifunc?, it says
As suggested by @ChristianBrabandt, when I set omnifunc to
python3complete#Complete, it can complete a few stuff, like
sys., but still doesn't work for other modules, e.g argparse. Why is that?
So a temporary fix is to set omnifunc in my
~/.vim/ftplugin/python.vim, unless anyone has a better suggestion?