我正在尝试在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我将这个文件:http://vim.cybermirror.org/runtime/autoload/python3complete.vim复制到~/vim73/share/vim/vim73/autoload/目录中,并在这个文件中:./share/vim/vim73/ftplugin/python.vim I change
setlocal omnifunc=pythoncomplete#Complete 至
setlocal omnifunc=python3complete#Complete.但是当我按<c-x, c-o>键时,我得到一条错误消息:
Error: Required vim compiled with +python3
E117: Unknown function: python3complete#Complete如果我写:python3,我会得到
E319: Sorry, the command is not available in this version发布于 2011-01-28 19:55:58
这取决于你的vim版本和操作系统提供Python和Python3的方式,是否同时支持python和python3。否则,如果完全编译进去,那么您第一次使用的Python版本将被激活。
查看以下线程和从那里链接的线程:Vim 7.3: Python3 support
发布于 2011-09-09 09:21:17
删除任何自动补全尝试,忘记您的问题,安装新编译缓存(script site)
我有与你完全相同的问题,这个脚本解决了我所有的自动补全需求,它的功能非常丰富,除非你需要它,否则你不会注意到它的存在。
https://stackoverflow.com/questions/3624788
复制相似问题