Trying to get vim to work with python

I am 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 will copy this file: http://vim.cybermirror.org/runtime/autoload/python3complete.vim to the ~/vim73/share/vim/vim73/autoload/ and in this file: ./share/vim/vim73/ftplugin/python.vim I am changing

 setlocal omnifunc=pythoncomplete#Complete 

to

 setlocal omnifunc=python3complete#Complete. 

But when I press <cx, co> , 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 
+4
source share
2 answers

It depends on your version of vim and how the OS provides Python and Python3, whether python and python3 are supported. Else, if compiled at all, will activate the version of Python that you are using for the first time.

Check out the following thread and its associated: Vim 7.3: Python3 support

+2
source

Remove any autocomplete attempts and forget about your problems, install neocomplcache (script site)

I had the same problem that you ran into, and this script solved all my completion needs, its really multifunctional, and you won't notice it there until you need it.

+2
source

All Articles