Setup VIM8+SpaceVIM on Ubuntu 16.04

VIM8+SpaceVIM

本文记录了如何在ubuntu16.04 上编译vim8(python3+,lua+),然后安装SpaceVIM.
SpaceVIM可以被看作是一个开箱即用的vim插件发行版本,值得推荐。
https://spacevim.org/

Setup VIM8+SpaceVIM on Ubuntu 16.04_第1张图片
image.png

为什么要装vim8+spacevim

装vim8是因为8.0确实多了很多特性,支持异步等等等。
装SpaceVIM是因为折腾累了,这个用起来还不错。
但是请谨记:工具本来的目的是提高工作效率,过度的学习就使它失去了意义。这个需要自己去平衡。


Install VIM8 (Manual )

OS: Ubuntu 16.04.2

  1. Clone vim source code
git clone https://github.com/vim/vim.git  vm8  
cd vim8/src 
  1. Install dependence packages
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 libperl-dev git libncurses5-dev libncursesw5-dev

  1. [Alternative 1]Configure with Python3+
./configure --with-features=huge \
          --enable-multibyte \
          --enable-rubyinterp=yes \
          --enable-python3interp=yes \
          --with-python-config-dir=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu \
          --enable-perlinterp=yes \
          --enable-luainterp=yes \
          --enable-cscope --prefix=/usr \
          --enable-fail-if-missing          
  1. [Alternative 2]Configure with Python2+
./configure --with-features=huge \
          --enable-multibyte \
          --enable-rubyinterp=yes \
          --enable-pythoninterp=yes \
          --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu \
          --enable-perlinterp=yes \
          --enable-luainterp=yes \
          --enable-cscope --prefix=/usr \
          --enable-fail-if-missing
  1. Remove vim7 packages. This may cause some problem when using spacevim, remove them then install vim8.
sudo apt list --installed|grep vim                     
sudo apt remove vim-*                                                                                                                                                                                       
  1. Install vim8
sudo make install
vim --version

Install SpaceVIM

  1. Install SpaceVIM
curl -sLf https://spacevim.org/install.sh | bash
  1. Install Powerline font
# clone
git clone https://github.com/powerline/fonts.git
# install
cd fonts
./install.sh
# clean-up a bit
cd ..
rm -rf fonts
  1. Configure terminal with powerline font
    Open Terminal --> Perfermance --> profile --> Edite --> General --> Custom font
    Select a Powerfont that you like. For example, Noto Mono for Powerline Regular
Setup VIM8+SpaceVIM on Ubuntu 16.04_第2张图片
image.png

Start VIM8 and install plugs

  1. Start vim then it will install all plugs. And Select "Dark powered mode"
vim

Read help for SpaceVim

Get spacevime help doc in vim.

:h Spacevim

你可能感兴趣的:(Setup VIM8+SpaceVIM on Ubuntu 16.04)