Problem with Vim omnicomplete and Python system

I have Vim installed, with +python ( :version says this is normal). My .vimrc contains

 filetype plugin on set ofu=syntaxcomplete#Complete autocmd FileType python setlocal omnifunc=pythoncomplete#Complete 

When some .py file is open, and I type ie pri and press Ctrl - X , Ctrl - O , does it say that the template was not found? Am I missing something? Is there any way to rebuild the Vim Python keyword database?

+3
source share
1 answer

Instead of syntaxcomplete#Complete use pythoncomplete#Complete :

 # ~/.vim/ftplugin/python.vim setlocal omnifunc=pythoncomplete#Complete # Or by autocmd autocmd FileType python setlocal omnifunc=pythoncomplete#Complete 

Python completion

+3
source

Source: https://habr.com/ru/post/1262612/


All Articles