vim 的代码更新很快,虽然大部分修改都不影响我们现在用的功能,但大的 feature 更新想体验的时候,可以试试源码 build
安装依赖
sudo apt-get install -y \
ncurses-dev \
python2.7-dev \
python3-dev \
perl \
libperl-dev \
ruby \
ruby-dev \
lua5.2 \
liblua5.2-dev \
libgtk-3-dev \
libxt-dev
cd ~/data/git_gh
# git clone https://github.com/vim/vim.git
cd vim
# git pull
make distclean # if you build Vim before
# ./configure --help
LDFLAGS="-L/home/yuzx/.rvm/rubies/default/lib" \
./configure --prefix=/usr/local \
--with-features=huge \
--enable-fail-if-missing \
--enable-luainterp \
--with-lua-prefix=/usr \
--enable-perlinterp \
--enable-pythoninterp=yes \
--enable-python3interp=yes \
--enable-rubyinterp \
--with-ruby-command=ruby \
--enable-cscope \
--enable-terminal \
--enable-autoservername \
--enable-multibyte \
--enable-xim \
--enable-fontset \
--enable-gui=gtk3 \
--enable-gnome-check \
--with-tlib=ncurses
make
# make check
sudo make install
# 设置 ubuntu 的 editor 为 vim
sudo update-alternatives --install /usr/bin/editor editor /usr/local/bin/vim 1
sudo update-alternatives --set editor /usr/local/bin/vim
sudo update-alternatives --install /usr/bin/vi vi /usr/local/bin/vim 1
sudo update-alternatives --set vi /usr/local/bin/vim