Setup VIM8+SpaceVIM on Ubuntu 16.04

VIM8+SpaceVIM

本文記錄了如何在ubuntu16.04 上編譯vim8(python3+,lua+),然后安裝SpaceVIM.
SpaceVIM可以被看作是一個開箱即用的vim插件發行版本,值得推薦。
https://spacevim.org/

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
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
最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容