源码安装vim

用git从github上clone一份源码

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

编译之前下载相关类库

sudo apt-get 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 ruby-dev mercurial

切换到vim目录下

cd ~/vim

设置编译属性

./configure --with-features=huge --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-perlinterp --with-python-config-dir=/usr/lib/python2.7/config/ --enable-gui=gtk2 --enable-cscope --prefix=/usr

开始编译安装

sudo make
sudo make install

如果要卸载

sudo make uninstall

你可能感兴趣的:(源码安装vim)