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.