centos--Debian 安装VIM ,从7.4升级至8.1

下载vim源码编译即可
# git clone https://github.com/vim/vim.git
# cd vim
# ./configure  --enable-pythoninterp=yes
# make -j 8
# make install
# cp src/vim /usr/bin
# vim --version
安装vim插件管理器
1.Set up vundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
2. 安装YCM
git clone https://github.com/Valloric/YouCompleteMe.git ~/.vim/bundle/YouCompleteMe
cd .vim/bundle/YouCompleteMe/
git submodule update --init --recursive
python3 install.py --clang-completer
// 如何报错(例如:libclang等信息)则执行 python3 install.py --clang-completer  --system-libclang
//安装完成后将.yum_extra_conf.py复制一份到 ~/   或者配置个性化的.ycm_extra_conf.py
cp ~/.vim/bundle/YouCompleteMe/third_party/ycmd/examples/.ycm_extra_conf.py ~/
3.Configure Plugins
配置.vimrc
4.install plugins
Launch vim and run :PluginInstall

Reference:

Centos7安装vim8.0 + YouCompleteMe
The ycmd server SHUT DOWN (restart with ‘:YcmRestartServer’)
使用vim插件管理器bundle
git-vundle
设置交换分区
使用插件打造vim环境

Debian下装vim同上一致
安装依赖:
apt-get install gcc
apt-get install gcc-dev
apt-get update
apt-get install build-essential
apt-get install cmake
apt-get install python3-dev
#安装vim
git clone https://github.com/vim/vim.git
cd vim
./configure  --enable-pythoninterp=yes
make -j 8
make install
cp src/vim /usr/bin
vim --version
#安装ycm
git clone https://github.com/Valloric/YouCompleteMe.git ~/.vim/bundle/YouCompleteMe
cd .vim/bundle/YouCompleteMe/
git submodule update --init --recursive
#此时python版本为python3
python install.py --clang-completer

查看系统cpp头文件目录
grep -rn iostream /usr/
发现cpp头文件在/usr/include/c++/6/
debian 的.vimrc 和 .ycm_extra_conf.py配置见Dropbox
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值