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
- Clone vim source code
git clone https://github.com/vim/vim.git vm8
cd vim8/src
- 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
- [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
- [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
- 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-*
- Install vim8
sudo make install
vim --version
Install SpaceVIM
- Install SpaceVIM
curl -sLf https://spacevim.org/install.sh | bash
- 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
- 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
- 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