简体   繁体   English

Vim-pythoncomplete自动完成

[英]Vim-pythoncomplete auto-complete

My vim config is in github.com/liuzheng712/config You can re-show my problem with this steps: 我的vim配置在github.com/liuzheng712/config中您可以通过以下步骤重新显示我的问题:

git clone https://github.com/liuzheng712/config.git --depth=1
cd config     
git submodule init     
git submodule update

Then you can soft-link .vim and .vimrc to your $HOME directory (Please backup your own .vim and .vimrc files) 然后你可以soft-link .vim and .vimrc到你的$HOME目录(请备份你自己的.vim和.vimrc文件)

After all things are done, when you do vim test.py and input "ihello." 完成所有工作后,当你执行vim test.pyinput "ihello." when you type "." 当你输入"." the following errors come 以下错误来了

Error detected while processing function pythoncomplete#Complete:     
line   35:     
Traceback (most recent call last):    
Press ENTER or type command to continue
Error detected while processing function pythoncomplete#Complete:
line   35:
File "<string>", line 1, in <module>
Press ENTER or type command to continue
Error detected while processing function pythoncomplete#Complete:
line   35:
File "<string>", line 40, in vimcomplete
Press ENTER or type command to continue
Error detected while processing function pythoncomplete#Complete:
line   35:
File "<string>", line 221, in get_completions
Press ENTER or type command to continue
Error detected while processing function pythoncomplete#Complete:
line   35:
NameError: global name 're' is not defined
Press ENTER or type command to continue
Error detected while processing function pythoncomplete#Complete:
line   36:
E121: Undefined variable: g:pythoncomplete_completions
Press ENTER or type command to continue
Error detected while processing function pythoncomplete#Complete:
line   36:
E15: Invalid expression: g:pythoncomplete_completions

Can any one solve my problem ? 任何人都可以解决我的问题吗? Thanks 谢谢

You may have more success with jedi-vim instead of pythoncomplete. 你可以用jedi-vim而不是pythoncomplete获得更多的成功。 Vim's omnicomplete for Python suffers from a number of bugs that jedi-vim solves. Vim对Python的omnicomplete遭受了jedi-vim解决的许多错误。 Pythoncomplete may have been started to solve some of these problems, but the project appears to be abandoned. Pythoncomplete可能已经开始解决其中一些问题,但该项目似乎已被放弃。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM