试图让vim使用python

试图让vim使用python,python,vim,autocomplete,code-completion,Python,Vim,Autocomplete,Code Completion,我试图在vim 7.3中完成python的代码。安装vim时,我使用以下配置: ./configure --prefix=${HOME}/vim73 --enable-python3interp=yes --with-python3-config-dir=/home/etobkru/Python3/lib/python3.1/config make && make install 我复制此文件: 在~/vim73/share/vim/vim73/autoload/目录和该文件

我试图在vim 7.3中完成python的代码。安装vim时,我使用以下配置:

./configure --prefix=${HOME}/vim73 --enable-python3interp=yes --with-python3-config-dir=/home/etobkru/Python3/lib/python3.1/config 
make && make install
我复制此文件: 在
~/vim73/share/vim/vim73/autoload/
目录和该文件中:
/share/vim/vim73/ftplugin/python.vim
I更改

setlocal omnifunc=pythoncomplete#Complete 

但当我按下
时,会收到一条错误消息:

Error: Required vim compiled with +python3
E117: Unknown function: python3complete#Complete
如果我写
:python3
,我会

E319: Sorry, the command is not available in this version

这取决于您的vim版本以及操作系统如何提供Python和Python3,以及Python和Python3是否同时受支持。否则,如果编译成功,那么您第一次使用的Python版本将被激活

检查以下线程和从那里链接的线程:

删除任何自动完成尝试,忘记您的问题,安装neocomplcache


我遇到了与您完全相同的问题,这个脚本解决了我所有的自动完成需求,它的功能非常丰富,在您需要它之前,您不会注意到它。

您可以通过键入:您正在使用的vi的版本已用python3编译来验证吗。也许它与您编译的不同。就像mb14所说的,您可以验证您使用的是正确的vim吗?如果您首先在终端中键入“vim”,请尝试“which vim”查看其路径。
E319: Sorry, the command is not available in this version