Closed xzwj closed 6 years ago
In Python3 only environment, autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
is needed.
I usually use vim edit python3, and occasionally edit python2. how can I fix it?
You should use Python3 complete instead.
Hey, Shougo. I have added autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
in .vimrc. but it have no effect. I have just started learning vim. could you tell me more detailed? Thank you!
Oh, I had mistake.
autocmd FileType python setlocal omnifunc=python3complete#Complete
Fixed! Thank you again :)
when I use ".\", I got an error:
function neocomplcache#handler #_do_auto_complete[55] .. neocomplcache#complete#set_results_pos[32] ..437[8]..193_set_complete_results_pos
function neocomplcache#handler #_do_auto_complete[55]..neocomplcache#complete#set_Vim(let):E117:
undefined function:pythoncomplete#Complete
I check
:echo has('python')
returns 0 andsetl omnifunc
returns omnifunc=pythoncomplete#Complete, but:echo has('python3')
returns 1I usually use vim edit python3, and occasionally edit python2. how can I fix it?