Install VIM 8.1 on Ubuntu 18.04 from source

发布时间: 2018-05-30 11:11:44 作者: 大象笔记

After upgraded to Ubuntu 18.04, I found VIM isn't installed by default. And Vim 8.1 is released days ago, so let's install Vim 8.1.

How to install VIM 8.1 on Ubuntu 18.04 with source code

Download latest vim source code from https://github.com/vim/vim/releases

Then unzip, cd into vim source directory.

 ./configure --prefix=/opt/local --with-features=huge --enable-pythoninterp=yes --enable-multibyte --with-vim-name=vim --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu
make
sudo make install

Some error you may encountered, and the solution.

configure: error: no acceptable C compiler found in $PATH

sudo apt install gcc

no terminal library found

no terminal library found checking for tgetent()... configure: error: NOT FOUND! You need to install a terminal library; for example ncurses. Or specify the name of the library with --with-tlib.

sudo apt-get install libncurses5-dev libncursesw5-dev

if_python.c:67:10: fatal error: Python.h: No such file or directory

sudo apt-get install python-dev 

install vundle to manage plugins

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
:PluginInstall

New features in Vim 8.1

The main new feature of Vim 8.1 is support for running a terminal in a Vim window.

But, as a vim fan, I don't think this's what we want. Vim shouldn't become Emacs. It's the thing tmux should focus on.

It's against Unix philosophy

我是一名山东烟台的开发者,联系作者