已经没用了,现在改的都是从github下载了
Linux安装YouCompleteMe一般有两种方法,使用bundle安装,或者直接使用git clone https://github.com/ycm-core/YouCompleteMe.git ~/.vim/bundle,可是无论哪种方法,(国内)经常会卡在安装第三方包时/go/src/golang.org/x/tools这儿。
原因: 无论哪种方法,执行完git clone https://github.com/ycm-core/YouCompleteMe.git ~/.vim/bundle后,需要在~/.vim/bundle/YouCompleteMe路径下进行操作git submodule update --init --recursive,由于有一个源是google的,国内连不上,所以会出错。
修改办法:
首先将之前失败的安装都删除,然后按照下面方法一步步安装,或者直接按照步骤3修改后重新安装。
-
跟之前一样先执行
git clone https://github.com/ycm-core/YouCompleteMe.git ~/.vim/bundle,此时路径~/.vim/bundle/YouCompleteMe/third_party/ycmd为空的。 -
然后在文件夹
YouCompleteMe中执行git submodule update --init。此时没有--recursive
此时路径~/.vim/bundle/YouCompleteMe/third_party/ycmd下会增加很多文件, -
然后编辑文件
vim ~/.vim/bundle/YouCompleteMe/third_party/ycmd/.gitmodules。
将最后[submodule "third_party/go/src/golang.org/x/tools"]中的URL如下修改:
将
url = https://go.googlesource.com/tools
ignore = dirty
修改为
url = https://github.com/golang/tools -
再按要求执行
git submodule update --init --recursive -
之后的安装跟配置网上都有很多
博客介绍了Linux安装YouCompleteMe的情况,通常有bundle安装和直接使用两种方法,但在国内安装时经常卡在第三方包安装环节。原因是有google源国内连不上。给出修改办法,先删除失败安装,可按步骤操作或修改后重新安装,还提及后续安装和配置网上资料多。
8398

被折叠的 条评论
为什么被折叠?



