ycm添加自定义补全路径
修改~/.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添加自定义补全路径的更多相关文章
- 源码安装Vim并配置YCM自动补全插件
Compiling Vim from source is actually not that difficult. Here's what you should do: 1. Install all ...
- 在Idea中添加自定义补全代码设置(Main方法为例)
一.打开File->setting->Editor->Live Templates 二.注意右边有“+”.“-”号,点击+号选择第二个Template Group...,并输入新组名 ...
- AutoFileName 使用src ,href 引入文件时,会自动补全路径的插件
AutoFileName功能:快捷输入文件名 简介:自动完成文件名的输入,如图片选取 使用:输入”/”即可看到相对于本项目文件夹的其他文件 只要输入 src="" 输入双引号就立马 ...
- 开启mac terminal 命令/路径自动补全功能
用惯了windows命令行工具的按Tab自动补全路径功能后,在mac terminal上敲命令很不习惯.其实mac terminal也有这个功能. 在命令行输入nano .inputrc 进入.inp ...
- vim代码补全-spf13,YouCompleteMe
vim代码补全 现在的图形界面的IDE(Integrated Development Environment)一般具有语法高亮,语法检查,自动补全功能,大大提高了编程的效率. vim作为文本编辑器其强 ...
- 跟我一起学Vim补全神级插件--YouCompleteMe
最近重拾Vim,编译部署来补全插件YCM,这个插件的补全效果和在写C代码的时候的自动提示错误信息等还是十分棒的,写点心得下来,也算给自己做个备忘. 快速安装: 首先参考我的.vimrc配置,用Vund ...
- 【vim】插件管理及代码智能提示与补全环境的配置
1. 引言 可以使用脚本/插件来给vim添加各种神奇的功能,从更换颜色主题.到代码智能提示,甚至项目管理.无数开发者通过开源社区贡献自己开发的插件,使得vim有可能变得无比强大.这儿http://vi ...
- Linux 中 10 个有用的命令行补全例子
在 Linux 系统中,当你输入一个命令,再按两次 TAB 键,就会列出所有以你输入字符开头的可用命令.这并不新鲜,可能你已经知道了.这个功能被称作命令行补全bash completion.默认情况下 ...
- java随笔1 Ctrl+1补全
Ctrl+1补全变量时,如果补全后的不是自己想要的, 比如:补全后这样 修改后 这时要对更改变量进行Ctrl+1补全路径 并且后者要进行Ctrl+1强转
随机推荐
- GDB详解
1 简介 2 生成调试信息 3 启动GDB 的方法 4 程序运行上下文 4.1 程序运行参数 4.2 工作目录 4.3 程序的输入输出 5 设置断点 5.1 简单断点 5.2 多文件设置断点 5.3 ...
- 使用nvm安装node
安装nvm curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash 安装node nvm ...
- 打造H5里的“3D全景漫游”秘籍
近来风生水起的VR虚拟现实技术,抽空想起年初完成的“星球计划”项目,总结篇文章与各位分享一下制作基于Html5的3D全景漫游秘籍. QQ物联与深圳市天文台合作,在手Q“发现新设备”-“公共设备”里,连 ...
- Oracle数据库自动增长列的实现过程
1.创建序列 -- Create sequence create sequence INNERID minvalue 1 maxvalue 99999999999999 start with 1 in ...
- Hibernate5.2之多对多关联关系(六)
Hibernate5.2之多对多关联关系(六) 一.简介 Hibernate中多对多关联关系在工程中使用的频率也是非常高的,例如:大学中学生选课.用户订单等.在本博客中笔者一样通过实例代码为读者阐述H ...
- List Arraylist 数组的区别
数组.List和ArrayList的区别 数组在内存中是连续存储的,所以它的索引速度是非常的快,而且赋值与修改元素也很简单,比如: ]; //赋值 s[]=]=]="c"; //修 ...
- Linux常见命令
du -sh 查看当前文件夹大小 tail -f /var/log/nginx/access.log 查看日志 vsFTPd Linux上面的ftp df -lh 查看磁盘 df -i 查看inode ...
- 解决java compiler level does not match the version of the installed java project facet
在项目目录的.setting文件夹下的org.eclipse.wst.common.project.facet.core.xml中 <installed facet="java&quo ...
- unix&linux大学教程 目录
第1章unix简介 第2章什么是linux?什么是unix 第3章unix连接 第4章开始使用unix 第5章gui:图形用户界面 第6章unix工作环境 第7章unix键盘使用 第8章能够立即使用的 ...
- [AIR] 新建窗口的方法
有时根据需要,我们需要在AIR程序中开多个窗口window 以下新建一个窗口: var opion:NativeWindowInitOptions = new NativeWindowInitOpti ...