开发者

trying to get vim to work with python

Im trying to get code completion for python in vim 7.3. When I install vim I use this configuration:

./configure --prefix=${HOME}/vim73 --enable-python3interp=yes --with-python3-config-dir=/home/etobkru/Python3/lib/python3.1/config 
make && make install

I copy this file: http://vim.cybermirror.org/runtime/autoload/python3complete.vim in to the ~/vim73/share/vim/vim73/autoload/ directory and in this file: ./share/vim/vim73/ftplugin/python.vim I change

setlocal omnifunc=pythoncomplete#Complete 

to

setlocal omnifunc=python3complete#Complete.

But when I press <c-x, c-o>开发者_如何转开发 I get an error message:

Error: Required vim compiled with +python3
E117: Unknown function: python3complete#Complete

and if I write :python3 I get

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


It depends on your vim version and on how the OS provides Python and Python3, whether python and python3 are supported both. Else if compiled in at all, then the Python version you first use will be activated.

Check out the following thread and the one linked from there: Vim 7.3: Python3 support


Delete any autocompletion attempts and forget about your problems, install neocomplcache (script site)

I had the exact same problem you had and this script solved all my autocompletion needs, its really feature rich and you won't notice its there until you need it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜