Изменить pythonpath в Vim

1957
eyeinthebrick

Я использую Vim для кодирования Python . Проблема в том, что я пишу в Python 3, а настройки Vim содержат только пути Python 2.7. Это не позволяет мне использовать плагины (например, python-mode) для автозаполнения и запуска скриптов. Нужно ли перекомпилировать Vim с поддержкой Python 3 (в настоящее время vim --versionотображается «-python3») или я могу просто добавить /usr/lib/python3Vim в $ pythonpath?

Моя ОС - это Arch Linux .

0

1 ответ на вопрос

0
Ingo Karkat

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.