youcompleteme install and configure
2016-01-14 19:42
471 查看
三四年前我配置vim插件的时候还都是手动配置,还没有听说vundle这个vim插件管理工具,现在配置vim插件的时候基本上都用vundle,这个插件也确实是方便快捷,只不过这东西时能话了就不清楚里面的一些基本原理了,就好像学c语言要学会用命令行一样,用IDE的话会理解不深刻1.需要需要确认vim支持python2.sudo dnf install vim git python python-devel gcc gcc-c++ cmake clang3.git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim4.在vim的配置文件vimrc里面添加如下内容(vimrc文件位置,命令模式下:echo $VIM)
在vim的配置文件vimrc里面添加如下内容(vimrc文件位置,命令模式下:echo $VIM) 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 'gmarik/Vundle.vim' Plugin 'Valloric/YouCompleteMe' " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required " To ignore plugin indent changes, instead use: "filetype plugin on " " Brief help " :PluginList - lists configured plugins " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate " :PluginSearch foo - searches for foo; append `!` to refresh local cache " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal " " see :h vundle for more details or wiki for FAQ " Put your non-Plugin stuff after this line5.打开vim,命令行模式下输入 :PluginInstall6.
进入YoucompleteMe目录, #cd ~/.vim/bundle/YoucompleteMe #./install --clang-completer //PS这里可以使用install --help查看支持哪些补全7.在.vimrc中添加
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'ok能用了如果想对ycm进行一些配置的话可以看官方文档https://github.com/Valloric/YouCompleteMe 的option一节
相关文章推荐
- 百度的UEditor富文本控件的使用
- Spring 核心 Ioc(DI)
- 指针2
- jQuery 对象和 json 之间的转换
- Elementary OS Freya 体验
- C++基础篇 -- vector的resize函数和reserve函数
- 关于胖Model 和 瘦Model
- [文章摘要]Extracting semantics of individual places from movement data by analyzing temporal patterns of
- Android的multidex带来的性能问题-减慢app启动速度
- virtualenv 管理python 环境
- [工作小结]PHP和其他编程语言联合开发网站的一种方法
- JAVA泛型详解
- 冬天,这“素三宝”一定要吃!比肉强多了!
- 其实你不知道MultiDex到底有多坑
- JQuery easyUI分页
- android:descendantFocusability用法简析(Item失效问题)
- 浅谈管道模型(Pipeline)
- Word中如何一次性删除全部批注?
- UIView常用属性的注意点:
- [SQL]复制数据库某一个表到另一个数据库中