Vim 的编译安装与卸载

Compile Vim

Posted by Scalpel on June 12, 2016

一、安装编译所需的工具和库

sudo apt install libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev python3-dev ruby-dev liblua5.3-dev libperl-dev mercurial 

二、下载最新版Vim

下载链接

三、编译安装Vim

解压下载的源码,并切换到当前目录,可通过以下命令查看支持的编译选项:

./configure --help

我用的编译选项:

./configure --with-features=huge --enable-rubyinterp=yes --enable-luainterp=yes --enable-perlinterp=yes --enable-tclinterp=yes --enable-pythoninterp=yes --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu/ --enable-python3interp=yes --with-python3-config-dir=/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu --enable-gui=auto --enable-cscope --enable-xim --enable-multibyte --prefix=/usr

安装:

sudo make VIMRUNTIMEDIR=/usr/share/vim/vim81
sudo make install

查看可使用的功能:

vim --version

四、卸载

sudo make uninstall