YouCompleteMe 编译全功能安装
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了YouCompleteMe 编译全功能安装相关的知识,希望对你有一定的参考价值。
YCM源码地址:https://github.com/Valloric/YouCompleteMe
安装依赖:
sudo apt-get install build-essential cmake sudo apt-get install python-dev python3-dev
获取源码
git clone https://github.com/Valloric/YouCompleteMe.git ~/.vim/bundle/YouCompleteMe cd ~/.vim/bundle
安装Momo
安装步骤参照:http://www.mono-project.com/download/#download-lin-ubuntu
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb http://download.mono-project.com/repo/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/mono-official.list sudo apt-get update sudo apt-get install mono-devel
安装Go
Go下载地址:https://golang.org/dl/
wget https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz tar -C /opt -xvf go1.8.3.linux-amd64.tar.gz
安装Node
Node下载地址:https://nodejs.org/en/download/
wget https://nodejs.org/dist/v6.11.1/node-v6.11.1-linux-x64.tar.xz tar xvf node-v6.11.1-linux-x64.tar.xz sudo mv node-v6.11.1-linux-x64 /opt/node
nmp 更新
npm install [email protected] -g
修改环境变量添加Momo和go变量每个人不同我的是vim ~/.profile
export GOROOT=/opt/go
PATH="$HOME/bin:$HOME/.local/bin:$GOROOT/bin:/opt/node/bin:$HOME/.cargo/bin:$PATH"
更新环境变量
source ~/.profile
typescript安装
npm install -g typescript
cd ~/.vim/bundle/YouCompleteMe
./inistall.py --all
单种语言支持对应软件和编译命令选项
- C# support: install Mono and add
--omnisharp-completer
when calling./install.py
. - Go support: install Go and add
--gocode-completer
when calling./install.py
. - TypeScript support: install Node.js and npm then install the TypeScript SDK with
npm install -g typescript
. - javascript support: install Node.js and npm and add
--tern-completer
when calling./install.py
. - Rust support: install Rust and add
--racer-completer
when calling./install.py
. - C语言安装 Clang 编译选项
--clang-completer
以上是关于YouCompleteMe 编译全功能安装的主要内容,如果未能解决你的问题,请参考以下文章
Windows 10环境安装VIM代码补全插件YouCompleteMe