自动补全插件YCM配置

本文档介绍了在Ubuntu 14.04上配置YouCompleteMe(YCM)自动补全插件的步骤,包括检查vim版本和Python支持,安装必要的开发工具和cmake,使用vundle管理vim插件,编译YCM,解决可能出现的clang错误,以及配置.ycm_extra_conf.py文件以实现语意补全功能。
摘要由CSDN通过智能技术生成

测试环境ubuntu 14.04。
1、检测安装环境是否支持;
检测vim版本是否在7.3.598及以上,是否安装有python2或python3;如果版本低请自行安装;
2、安装开发工具和cmake;sudo apt-get install build-essential cmake
安装python头文件;sudo apt-get install python-dev python3-dev.
3、安装vim插件管理工具vundle;
3.1克隆源码到本地;
家目录下执行:
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
3.2在vimrc加入vundle配置代码;

set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
Plugin &
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值