ubuntu 下安装 YouCompleteMe

1、安装用到的软件包

sudo apt-get install vim
sudo apt-get install git
sudo apt-get install subversion
sudo apt-get install python-dev libxml2-dev libxslt-dev
sudo apt-get install gcc
sudo apt-get install cmake

2.安装Vundle

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

编辑 ~/.vimrc, 加入以下:

set nocompatible              " be iMproved, required
filetype off                  " required

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'

Plugin 'Valloric/YouCompleteMe'

call vundle#end()            " required
filetype plugin indent on    " required

3.安装YouCompleteMe

#下载YouCompleteMe源码
git clone https://github.com/Valloric/YouCompleteMe.git ~/.vim/bundle/YouCompleteMe
cd YouCompleteMe/ 
#获取YCM的依赖包  
git submodule update --init --recursive
cd ~/.vim/bundle/YouCompleteMe  
./install.py --clang-completer

参考链接:https://blog.csdn.net/cromma/article/details/52841588

 
原文地址:https://www.cnblogs.com/zhenfei/p/8906983.html