美文网首页
编译Vim huge版

编译Vim huge版

作者: Godan | 来源:发表于2019-12-08 00:11 被阅读0次

本文介绍 Ubuntu 和 CentOS 下编译 huge 版 Vim,huge版包含最多特性,其中包括支持系统剪贴板。

  1. 克隆最新的vim代码
git clone https://github.com/vim/vim.git
  1. 安装完毕后,使用 vim --version 查看支持的特性

Ubuntu

# 编译vim(huge特性)
sudo apt-get install build-dep
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 ruby-dev \
        mercurial -y

sudo apt build-dep vim
sudo apt install cscope

./configure --with-features=huge \
--enable-multibyte \
--enable-rubyinterp \
--enable-python3interp \
--with-python3-config-dir=/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu \
--enable-perlinterp \
--enable-luainterp \
--enable-cscope \
--enable-gui=auto \
--enable-gtk2-check \
--with-x \
--with-compiledby="j.jith" \
--prefix="/usr/local" 

make && sudo make install

CentOS

yum install -y gcc

yum-builddep -y vim

yum install -y lua-devel python3-devel xorg-x11-font-utils

git clone https://github.com/vim/vim.git /usr/local/vim
cd /usr/local/vim

./configure --with-features=huge \
--enable-multibyte \
--enable-rubyinterp \
--enable-pythoninterp \
--with-python-config-dir=/usr/lib64/python2.7/config \
--enable-python3interp \
--with-python3-command=python3.6 \
--with-python3-config-dir=/usr/lib64/python3.6/config-3.6m-x86_64-linux-gnu \
--enable-perlinterp \
--enable-luainterp \
--enable-cscope \
--enable-gui=auto \
--enable-gtk2-check \
--with-x \
--with-compiledby="j.jith" \
--prefix="/usr/local" \
--enable-fail-if-missing 

make && make install

# 将终端设置为256色
cat << EOF >>~/.bash_profile

# 设置终端颜色板
if [ -e /usr/share/terminfo/x/xterm-256color ]; then
        export TERM='xterm-256color'
else
        export TERM='xterm-color'
fi
EOF

用Vim做开发,也许你会喜欢SpaceVim,快速方便的环境搭建,简便的开发语言配置,还有更多惊喜等着你发掘,甚至让你忍不住打广告

相关文章

网友评论

      本文标题:编译Vim huge版

      本文链接:https://www.haomeiwen.com/subject/tpvpgctx.html