开发者

Problem with Vim omnicomplete and system Python

开发者 https://www.devze.com 2023-04-01 23:09 出处:网络
I have Vim set up, with +python (:version says it\'s ok). My .vimrc contains filetype plugin on set ofu=syntaxcomplete#Complete

I have Vim set up, with +python (:version says it's ok). 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 i.e. pri and press Ctrl-X, Ctrl-O, it says no pattern was found? Am I missing something? Can I someh开发者_开发知识库ow rebuild Vim's Python keyword database?


Rather than syntaxcomplete#Complete, use pythoncomplete#Complete:

# ~/.vim/ftplugin/python.vim
setlocal omnifunc=pythoncomplete#Complete

# Or by autocmd
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete

Problem with Vim omnicomplete and system Python

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号