vim8.0 编译安装支持clipboard................
1、若以前有系统装的vim先移除掉,比如ubuntu下:
> dpkg -l | grep vim
> sudo dpkg -P vim vim-common vim-run
2、vim 依赖,某些语言库据自己情况而定。
> 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 python3-dev ruby-dev lua5.1 lua5.1-dev
3、configure 在配置的时候会出现一堆的"checking ...", 查看 "checking if X11 header files can be found... " 这一行,如果为yes则支持clipboard,否则安装libgtk2.0-dev, libgnome2-dev, libxt-dev, libx11-dev,
然后执行:
> ./configure --with-feature=huge --with-x
查看上面的" checking if X11 header files can be found...", 尾部是不是yes,是的话就可以了,否则看看还有没有其他依赖没装。
4 、配置安装:
> ./configure --with-features=huge --enable-gui=auto --enable-gtk2-check --enable-gnome-check --with-x --enable-python3interp \
--enable-pythoninterp --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu/ --enable-rubyinterp \
--enable-luainterp --enable-perlinterp --with-python3-config-dir=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu/ \
--enable-multibyte --enable-cscope --enable-gui=gnome2 --prefix=/usr
> make VIMRUNTIMEDIR=/usr/share/vim/vim80 && sudo make install
如果用户目录下找不到vim,挂一个软链接到/usr/bin/vim上。
如果backspace不好用,.vimrc设置
set nocompatible
set backspace=indent,eol,start
设置默认编辑器
sudo update-alternatives --install /usr/bin/editor editor /usr/bin/vim 1
sudo update-alternatives --set editor /usr/bin/vim
sudo update-alternatives --install /usr/bin/vi vi /usr/bin/vim 1
sudo update-alternatives --set vi /usr/bin/vim