vim-plus(youcompleteme)的完整安装及(pluginstall无法下载等)问题的解决

on ubuntu16.04

vimplus是集成了多个vim插件的vim配置,实现了一键安装,非常方便,可在官网查看其详细信息和使用帮助

https://github.com/chxuan/vimplus.git

安装vimplus

git clone https://github.com/chxuan/vimplus.git ~/.vimplus
cd ~/.vimplus
./install.sh

其中使用vim的PlugInstall时会报错无法访问github,解决方案

本质是无法访问github网站的问题,解决方案是换镜像源
参考https://blog.csdn.net/htx1020/article/details/114364510

cd ~/.vim/autoload
vim plug.vim

let fmt = get(g:, 'plug_url_format', 'https://git::@github.com/%s.git')

修改为

let fmt = get(g:, 'plug_url_format', 'https://git::@hub.fastgit.org/%s.git')

\ '^https://git::@github\.com', 'https://github.com', '')

改为

\ '^https://git::@hub.fastgit\.org', 'https://hub.fastgit.org', '')

重新启动vim
输入:PlugInstall
即可

手动编译安装YouCompleteme

cd ~/.vim/plugged/YouCompleteMe
python3 install.py --clang-completer

会提示先使用

git submodule update --init --recursive

期间由于github被墙可能有下载很慢的问题

可以换成国内镜像源提高速度:
编辑文件夹中的隐藏文件 .gitmodules,
把url地址github.com后面加上.cnpmjs.org后缀

clangd用于ycm中c family的代码补全,出现了安装包无法下载的问题

解决方案:
首先确认你的youCompleteme是否是最新版本,新版本对于clangd的源进行了更换,

如果依然无法下载,可以采取以下策略
参考:https://blog.csdn.net/sunshine_world/article/details/109862228

手动下载

clangd-x.0.0-x86_64-unknown-linux-gnu.tar.bz2

~/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/clangd/cache

解压到

~/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/clangd/output

重新运行
cd ~/.vim/plugged/YouCompleteMe
python3 install.py --clang-completer

猜你喜欢

转载自blog.csdn.net/dsfsdfrtjj/article/details/120510905