CentOS7编译安装vim8
程序员文章站
2024-03-11 10:45:31
...
参考:https://www.cnblogs.com/nidey/p/8657016.html
1.下载源码
git clone https://github.com/vim/vim.git
2.安装依赖
yum install -y gcc gcc-c++ ruby ruby-devel lua lua-devel \
ctags git python python-devel \
tcl-devel ncurses-devel \
perl perl-devel perl-ExtUtils-ParseXS \
perl-ExtUtils-CBuilder \
perl-ExtUtils-Embed
3.编译安装
tar zxvf vim-8*.tar.gz && cd vim-8.*
./configure --with-features=huge \
--enable-multibyte \
--enable-rubyinterp=yes \
--enable-pythoninterp=yes \
--with-python-config-dir=/usr/lib64/python2.7/config \
--enable-perlinterp=yes \
--enable-luainterp=yes \
--enable-cscope \
--prefix=/usr/local
make VIMRUNTIMEDIR=/usr/local/share/vim/vim8
make install
4.更改下系统编辑器(以下命令需要管理员权限)
update-alternatives --install /usr/bin/editor editor /usr/local/bin/vim 1
update-alternatives --set editor /usr/local/bin/vim
update-alternatives --install /usr/bin/vi vi /usr/local/bin/vim 1
update-alternatives --set vi /usr/local/bin/vim
最后别忘了source /etc/profile
上一篇: centos7 安装vim8