How to enable python3 in vim?

11,132

Solution 1

You didn't tell us the platform you're on, but it basically boils down to:

  • Installing the prerequisite packages needed for Python 3 and for compiling Vim
  • Compile Vim with the configure --enable-python3interp option

Solution 2

$sudo apt-get install vim-gnome

should take care of that but the official repos are a bit behind.

I've been using this ppa for a while. After you have added it to your sources, upgrading Vim should give you python 3 support. It does, here.

Share:
11,132
Mesi Rendón
Author by

Mesi Rendón

Updated on July 26, 2022

Comments

  • Mesi Rendón
    Mesi Rendón over 1 year

    I've been using vim for some time, and now in a need to use the python3 feature.

    If I type vim --version | grep python I get -python3

    How can I do to enable it?

  • Mesi Rendón
    Mesi Rendón about 11 years
    Hi Ingo, you're right, I didn't specified that directly, but in the tags I put ubuntu. Thanks anyway, as I've been reading, I'd say this is the only way.
  • amerixan
    amerixan over 2 years
    Slight correction, ./configure --enable-python3interp. The user should be able to know how to install from source, but explicitness is nice for lazy people. :)