记录centos vim8 安装vimplus后安装YouCompleteMe

安装vimplus之后YouCompleteMe一直不能使用,经过一段时间折腾,终于好了,在此记录。

参考博客:
http://www.cnblogs.com/tsts/p/7554981.html
https://blog.csdn.net/nzyalj/article/details/75331822

系统版本:

# cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core)

重要内容:vim8要么只支持Python3,要么只支持Python2装了两个也是只有python2可以工作,本篇帖子选择的是python2

vim安装时很重要,首先要确定依赖是否全部安装:

yum install mercurial ncurses-devel ruby ruby-devel lua lua-devel luajit python-devel python34 python34-devel
cd ~
git clone https://github.com/vim/vim.git
cd ./vim
./configure --with-features=huge -enable-pythoninterp --with-python-config-dir=/usr/lib/python2.7/config
make
make install

vimplus自动安装好之后YouCompleteMe在系统的 ~/.vim/plugged/YouCompleteMe 路径下
先删除之前装的YouCompleteMe目录:

rm -rf ~/.vim/plugged/YouCompleteMe
# 非管理员用户要加上sudo

从git上拉取YouCompleteMe

git clone https://github.com/Valloric/YouCompleteMe.git ~/.vim/plugged/YouCompleteMe
cd ~/.vim/plugged/YouCompleteMe
git submodule update --init --recursive

等待下载完毕,执行安装命令

./install.py --clang-completer

注意:安装时系统内存要保证足够,不然可能会编译失败,内存如果不够大,建议配置交换内存,请自行查询配置。
附成功图一张:
效果图

猜你喜欢

转载自blog.csdn.net/csdn_meng/article/details/87861439
今日推荐