码迷,mamicode.com
首页 > 系统相关 > 详细

CentOS6.7源码编译安装vim8.0

时间:2017-10-20 10:18:29      阅读:424      评论:0      收藏:0      [点我收藏+]

标签:ati   from   gtk2   hub   源码编译   pytho   pre   run   停止   

参考网址:
1、https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source

源码编译安装Python-2.7.14、Python-3.3.7
https://www.python.org/ftp/python/2.7.14/Python-2.7.14rc1.tgz
https://www.python.org/ftp/python/3.3.7/Python-3.3.7.tgz

安装依赖库
sudo yum install -y ruby ruby-devel lua lua-devel luajit \
luajit-devel ctags git python python-devel \
python34 python34-devel tcl-devel \
perl perl-devel perl-ExtUtils-ParseXS \
perl-ExtUtils-XSpp perl-ExtUtils-CBuilder \
perl-ExtUtils-Embed libX11-devel \

下载vim源码
git clone https://github.com/vim/vim.git

删除旧版本的vim
sudo yum -y remove vim

配置configure、编译、安装
sudo ./configure --with-features=huge \
--enable-multibyte \
--enable-rubyinterp=yes \
--enable-pythoninterp=yes \
#--with-python-config-dir=/usr/local/python-2.7.14/lib/python2.7/config \
#--enable-python3interp=yes \
--with-python3-config-dir=/usr/local/python-3.5.3/lib/python3.5/config-3.5m \
--enable-perlinterp=yes \
--enable-luainterp=yes \
--enable-gui=gtk2 \
--enable-cscope \
--prefix=/usr/local/vim-8.0
make VIMRUNTIMEDIR=/usr/local/vim-8.0/share/vim/vim80
make install
#不能同时支持python2和python3的脚本,只能2选1,如果同时允许的话,
当安装完成以后输入:vim--version的时候,将出现python/dyn和python3/dyn,
表示对python的脚本支持都停止
#with-python3-config-dir=/usr/local/python-3.5.3/lib/python3.5/config-3.5m中的
config-3.5m每个平台不一样的,和自己的机器有关

设置vim为默认编辑器
#Set vim as your default editor with update-alternatives.
sudo update-alternatives --install /usr/bin/editor editor /usr/local/vim-8.0/bin/vim 1
sudo update-alternatives --set editor /usr/local/vim-8.0/bin/vim
sudo update-alternatives --install /usr/bin/vi vi /usr/local/vim-8.0/bin/vim 1
sudo update-alternatives --set vi /usr/local/vim-8.0/bin/vim
/usr/local/vim-8.0/bin/vim中的/usr/local/vim-8.0是vim的安装目录

CentOS6.7源码编译安装vim8.0

标签:ati   from   gtk2   hub   源码编译   pytho   pre   run   停止   

原文地址:http://www.cnblogs.com/calvinlu/p/7697514.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!