修改~/.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. AES加密算法C++实现

    我从网上下载了一套AES加密算法的C++实现,代码如下: (1)aes.h #ifndef SRC_UTILS_AES_H #define SRC_UTILS_AES_H class AES { pu ...

  2. 加密配置文件(App.Config和Web.config)中connectionStrings通用方法

    1. 背景:根据项目的要求,需要对配置文件配置的数据库连接字符串进行加密,也就是对ConnectinString节点的内容进行加密存储,同时考虑到代码使用连接字符串不需要进行更改,C#会自动对加密的内 ...

  3. Ubuntu 16.04中安装Chromium浏览器

    引用:http://www.linuxidc.com/Linux/2016-05/131097.htm 通过ppa,安装最新版本的Chromium浏览器 sudo add-apt-repository ...

  4. jquery深拷贝和浅拷贝

    var obj1 = { a: 1 };var obj2 = { b: {bbb: 2} };function Clone(){//浅拷贝 拷贝到obj1值会被改变 在一个栈中 $.extend(ob ...

  5. MVC项目中WebViewPage的实战应用

    由于公司的项目可能会卖到国外,所以需要支持多语言.今天我就在目前的项目中实现了多语言功能,下面记录我的具体实现. 1.相信很多朋友在用MVC做项目时候,都会遇到“视图必须派生自 WebViewPage ...

  6. 转mysql 多表 update sql语句总结

    mysql 多表 update 有几种不同的写法. 假定我们有两张表,一张表为Product表存放产品信息,其中有产品价格列Price:另外一张表是ProductPrice表,我们要将ProductP ...

  7. unity中的WWW通讯问题

    网上很多写到WWW的问题. 一.局限性比较大,使用不方便二.WWW类的使用不符合微软的命名规范三.在大量并发使用WWW类会发生"Too Many Threads"的异常 确实有些, ...

  8. React Native

    可以基于 React Native使用 JavaScript 编写应用逻辑,UI 则可以保持全是原生的.这样的话就没有必要就 HTML5 的 UI 做出常见的妥协: React 引入了一种与众不同的. ...

  9. 实现类似QQ对话聊天功能脚本

    var skin : GUISkin; var showChat = false;private var inputField = "";private var display = ...

  10. 4、IMS

    链:1:http://www.cnblogs.com/gnuhpc/archive/2012/12/11/2813494.html [笔记] 1.<计算机网络(第五版)>P10-15:电路 ...