Vim-pythoncomplete自动完成

时间:2013-11-13 04:18:51

标签: python vim

我的vim配置位于github.com/liuzheng712/config 您可以通过以下步骤重新显示我的问题:

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

然后您可以soft-link .vim and .vimrc到您的$HOME目录 (请备份您自己的.vim和.vimrc文件)

完成所有工作后,当您执行vim test.pyinput "ihello."时 当您键入"."时,会出现以下错误

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

任何人都可以解决我的问题吗?感谢

1 个答案:

答案 0 :(得分:2)

使用jedi-vim代替pythoncomplete可能会取得更大成功。 Vim对Python的omnicomplete遭受了jedi-vim解决的许多错误。 Pythoncomplete可能已经开始解决其中的一些问题,但该项目似乎已被放弃。

相关问题