Change pythonpath in Vim

1

I'm using Vim for Python coding. The problem is, that I'm writing in Python 3 and Vim settings contain only Python 2.7 paths. That does not allow me to use plugins (like python-mode) for autocomletion and running scripts. Do I have to recompile Vim with Python 3 support (currently vim --version shows "-python3") or can I simply add /usr/lib/python3 to Vim's $pythonpath?

My OS is Arch Linux.

eyeinthebrick

Posted 2014-04-11T18:44:45.757

Reputation: 115

Answers

0

To be able to use Python 3, you need to have support for the Python 3 interpreter built into Vim, as such plugins will use the :python3 command to run that code. Also, I don't think that the Python 2 interpreter would be able to correctly run Python 3 code from that version's library path.

So yes, you need to install / compile a Vim version with +python3.

Ingo Karkat

Posted 2014-04-11T18:44:45.757

Reputation: 19 513