Vim adds Python3 support and settings.

Source: Internet
Author: User
Tags git clone

First remove the old vim.

1.sudo apt-get Remove vim         /input re press TAB to display remove

2.sudo apt-get remove  vim-runtime

3.sudo apt-get Remove Vim-tiny

4.sudo apt-get Remove Vim-common

Then download the VIM8 Source:

git clone https://github.com/vim/vim.git

To compile and install, add support for Python3 and python2.7:
Enter the downloaded VIM source folder:

CD vim/src
./configure--with-features=huge \
            --enable-multibyte \
            --enable-rubyinterp=yes \
            -- Enable-pythoninterp=yes \
            --with-python-config-dir=/usr/lib/python2.7/config \
            --enable-python3interp= Yes \
            --with-python3-config-dir=/usr/lib/python3.5/config \
            --enable-perlinterp=yes \-
            - Enable-luainterp=yes \
            --enable-gui=gtk2--enable-cscope \ 
            --prefix=/usr/local/vim8   

Remember to create the prefix directory. And find the right Python installation path.
Continue to execute under current folder

sudo make
sudo make install

Add complete. But it has not yet entered the environment variable. You can add it yourself. You can also set:

sudo update-alternatives--install/usr/bin/editor editor/usr/local/vim8/bin/vim 1
sudo update-alternatives--set Editor/usr/local/vim8/bin/vim
sudo update-alternatives--install/usr/bin/vim vim/usr/local/vim8/bin/vim 1
sudo update-alternatives--set vim/usr/local/vim8/bin/vim

Finish.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.