1. 程式人生 > >YouCompleteMe 編譯全功能安裝

YouCompleteMe 編譯全功能安裝

cnblogs repo port nload apt-key linux scrip asc server

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 編譯全功能安裝