Open lgalke opened 6 years ago
:+1: with some change on the solution
if &omnifunc == ''
if has('python') | setlocal omnifunc=pythoncomplete#Complete | endif
if has('python3') | setlocal omnifunc=python3complete#Complete | endif
endif
Hi guys, I am no longer the maintainer of the python ftplugin. See github.com/tpict/vim-ftplugin-python.
I forgot to update the readme. That's totally my bad, sorry! I'll do that now.
Dear maintainer,
Problem
The
omnifunc
is overwritten in this ftplugin script. This makes it hard to set a custom omnifunc for python. When specifyingautocmd FileType python setlocal omnifunc=foo#bar
, theomnifunc
gets overwritten. Also, I noticed that the defaultpythoncomplete#Complete
is not shipped with vim (at least not in -python, -python3), which leads toE117: Unknown function: pythoncomplete#Complete
upon pressing<C-X><C-O>
.So, when I want to manually set
omnifunc
for python, I would need to put the customization intoafter/ftplugin/python.vim
?Possible fixes
Safe set omnifunc