修改~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py的flags变量

未改前如下:

flags = [ 

'-Wall',

'-Wextra',

'-Werror',

'-Wc++98-compat',

'-Wno-long-long',

'-Wno-variadic-macros',

'-fexceptions',

'-DNDEBUG',

# You 100% do NOT need -DUSE_CLANG_COMPLETER in your flags; only the YCM

# source code needs it.

'-DUSE_CLANG_COMPLETER',

# THIS IS IMPORTANT! Without a "-std=<something>" flag, clang won't know which

# language to use when compiling headers. So it will guess. Badly. So C++

# headers will be compiled as C headers. You don't want that so ALWAYS specify

# a "-std=<something>".

# For a C project, you would set this to something like 'c99' instead of

# 'c++11'.

'-std=c++11',

# ...and the same thing goes for the magic -x option which specifies the

# language that the files to be compiled are written in. This is mostly

# relevant for c++ headers.

# For a C project, you would set this to 'c' instead of 'c++'.

'-x',

'c++',

'-isystem',

'../BoostParts',

'-isystem',

# This path will only work on OS X, but extra paths that don't exist are not

# harmful

'/System/Library/Frameworks/Python.framework/Headers',

'-isystem',

'../llvm/include',

'-isystem',

'../llvm/tools/clang/include',

'-I',

'.',

'-I',

'./ClangCompleter',

'-isystem',

'./tests/gmock/gtest',

'-isystem',

'./tests/gmock/gtest/include',

'-isystem',

'./tests/gmock',

'-isystem',

'./tests/gmock/include',

'-isystem',

'/usr/local/include']

在后面添加搜索路径:如/opt/nginx/include

则:

flags = [ 

'-Wall',

'-Wextra',

'-Werror',

'-Wc++98-compat',

'-Wno-long-long',

'-Wno-variadic-macros',

'-fexceptions',

'-DNDEBUG',

# You 100% do NOT need -DUSE_CLANG_COMPLETER in your flags; only the YCM

# source code needs it.

'-DUSE_CLANG_COMPLETER',

# THIS IS IMPORTANT! Without a "-std=<something>" flag, clang won't know which

# language to use when compiling headers. So it will guess. Badly. So C++

# headers will be compiled as C headers. You don't want that so ALWAYS specify

# a "-std=<something>".

# For a C project, you would set this to something like 'c99' instead of

# 'c++11'.

'-std=c++11',

# ...and the same thing goes for the magic -x option which specifies the

# language that the files to be compiled are written in. This is mostly

# relevant for c++ headers.

# For a C project, you would set this to 'c' instead of 'c++'.

'-x',

'c++',

'-isystem',

'../BoostParts',

'-isystem',

# This path will only work on OS X, but extra paths that don't exist are not

# harmful

'/System/Library/Frameworks/Python.framework/Headers',

'-isystem',

'../llvm/include',

'-isystem',

'../llvm/tools/clang/include',

'-I',

'.',

'-I',

'./ClangCompleter',

'-isystem',

'./tests/gmock/gtest',

'-isystem',

'./tests/gmock/gtest/include',

'-isystem',

'./tests/gmock',

'-isystem',

'./tests/gmock/include',

'-isystem',

'/usr/local/include',

'-I',

'/opt/nginx/include']

ycm添加自定义补全路径的更多相关文章

  1. 源码安装Vim并配置YCM自动补全插件

    Compiling Vim from source is actually not that difficult. Here's what you should do: 1. Install all ...

  2. 在Idea中添加自定义补全代码设置(Main方法为例)

    一.打开File->setting->Editor->Live Templates 二.注意右边有“+”.“-”号,点击+号选择第二个Template Group...,并输入新组名 ...

  3. AutoFileName 使用src ,href 引入文件时,会自动补全路径的插件

    AutoFileName功能:快捷输入文件名 简介:自动完成文件名的输入,如图片选取 使用:输入”/”即可看到相对于本项目文件夹的其他文件 只要输入 src="" 输入双引号就立马 ...

  4. 开启mac terminal 命令/路径自动补全功能

    用惯了windows命令行工具的按Tab自动补全路径功能后,在mac terminal上敲命令很不习惯.其实mac terminal也有这个功能. 在命令行输入nano .inputrc 进入.inp ...

  5. vim代码补全-spf13,YouCompleteMe

    vim代码补全 现在的图形界面的IDE(Integrated Development Environment)一般具有语法高亮,语法检查,自动补全功能,大大提高了编程的效率. vim作为文本编辑器其强 ...

  6. 跟我一起学Vim补全神级插件--YouCompleteMe

    最近重拾Vim,编译部署来补全插件YCM,这个插件的补全效果和在写C代码的时候的自动提示错误信息等还是十分棒的,写点心得下来,也算给自己做个备忘. 快速安装: 首先参考我的.vimrc配置,用Vund ...

  7. 【vim】插件管理及代码智能提示与补全环境的配置

    1. 引言 可以使用脚本/插件来给vim添加各种神奇的功能,从更换颜色主题.到代码智能提示,甚至项目管理.无数开发者通过开源社区贡献自己开发的插件,使得vim有可能变得无比强大.这儿http://vi ...

  8. Linux 中 10 个有用的命令行补全例子

    在 Linux 系统中,当你输入一个命令,再按两次 TAB 键,就会列出所有以你输入字符开头的可用命令.这并不新鲜,可能你已经知道了.这个功能被称作命令行补全bash completion.默认情况下 ...

  9. java随笔1 Ctrl+1补全

    Ctrl+1补全变量时,如果补全后的不是自己想要的, 比如:补全后这样 修改后 这时要对更改变量进行Ctrl+1补全路径 并且后者要进行Ctrl+1强转

随机推荐

  1. VR内容定制请找北京动软VR团队,长年承接VR/AR应用、游戏内容定制

    最近这一拔VR及AR浪潮得到业界的热捧,与2015年年底到2016年年初乐相.蚁视.睿悦.焰火工坊等VR创业公司,陆续发布融资的信息不无关系.业界也有统计数据称,约90%的VR投资案例,发生在2015 ...

  2. Building GCC 4.1.2 in CentOS 7 for Maya API development

    Following the official guid: http://help.autodesk.com/cloudhelp/2015/ENU/Maya-SDK/files/Setting_up_y ...

  3. Windows 查看端口占用和关闭进程

    支持原创地址 :http://www.cnblogs.com/moodlxs/p/4145384.html 开始--运行--cmd 进入命令提示符 输入netstat -ano 即可看到所有连接的PI ...

  4. System.Data.EntityState”在未被引用的程序集中定义

    类型“System.Data.EntityState”在未被引用的程序集中定义.必须添加对程序集“System.Data.Entity, Version=4.0.0.0, Culture=neu 错误 ...

  5. 解压版Tomcat配置

    解压版Tomcat配置(本例Tomcat6):   一 配置Tomcat 1 下载Tomcat Zip压缩包,解压.      如果增加tomcat的用户名和密码,则修改/conf/tomcat-us ...

  6. css3画三角形的原理

    以前用过css3画过下拉菜单里文字后面的“下拉三角符号”,类似于下面这张图片文字后面三角符号的效果 下面是一个很简单的向上的三角形代码 #triangle-up { width: 0; height: ...

  7. XE7 & IOS开发之开发账号(1):开发证书、AppID、设备、开发授权profile的申请使用,附Debug真机调试演示(XCode所有版本通用,有图有真相)

    网上能找到的关于Delphi XE系列的移动开发的相关文章甚少,本文尽量以详细的图文内容.傻瓜式的表达来告诉你想要的答案. 原创作品,请尊重作者劳动成果,转载请注明出处!!! 注意,以下讨论都是以&q ...

  8. CentOS开机无法进入系统,如何查错

    开机时按e/F5按钮,进入选择系统界面 会出现 CentOS(2.6.32-...类似的选择列表,选择默认的系统然后按e: 这时会出现 root kernel ... initd... 三个选项,选择 ...

  9. java @Autowired与@Resource的区别

    @Autowired与@Resource的区别     1.@Autowired与@Resource都可以用来装配bean. 都可以写在字段上,或写在setter方法上. 2.@Autowired默认 ...

  10. 自制MFC消息响应定位器+原理分析

    mfc里面有张消息映射表(MESSAGE_MAP),消息都是通过这张表来分发到相应函数里的. 这个是我自制的定位器,从vc6.0到现在的2013生成的mfc都可以用,全静态扫描并已处理动态基址. 下面 ...