我可以只从带有 Ctags 的C++文件中获取 #includes 吗?
Can I get only the #includes from C++ files with Ctags?
是否可以从具有旺盛的Ctags或通用Ctags的指定C++源文件中获取仅 #include + file指令的列表?
使用最新版本的 Universal-ctags,您可以使用以下命令行来枚举头文件:
$ ctags -o - --extras=r --kinds-C++=h --language-force=C++ INPUT-FILE.h
例如:
$./ctags -o - --extras=r --kinds-C++=h --language-force=C++ /usr/include/pwd.h
bits/types.h /usr/include/pwd.h /^#include <bits/types.h>/;" h
features.h /usr/include/pwd.h /^#include <features.h>/;" h
stddef.h /usr/include/pwd.h /^#include <stddef.h>/;" h
stdio.h /usr/include/pwd.h /^# include <stdio.h>/;" h
相关文章:
- C++ - 忽略并从其他文件获取数据
- 为什么从文件获取图标时应用程序有时会崩溃?
- 如何在 c++ 窗口中将参数和返回的退出值传递到批处理文件/从批处理文件获取返回的退出值
- Qt .pro 文件获取 Qtkit 名称
- 提升属性树:如何使用xml文件获取子树的子级
- 从C 中的二进制文件获取整数值时
- 如何在Windows上绕过主机文件获取真实的IP地址
- 如何使用 CPP/C# 从 VHDX 文件获取文件(或文件系统)
- 从读取到对象指针数组的文件获取段错误
- 是否可以从IOS项目中的cpp文件获取文件路径
- 将数据从头文件获取到源文件中的非成员函数中
- 从两个不同的文件获取输入时,输入会发生变化
- 从文件 C++ 获取整数
- 通过在 C++ 中使用发布模式二进制文件获取崩溃原因
- C++ 将值从文件获取到数组中
- 使用HTTP上载文件.获取错误:-HttpSendReuest 12005
- 正在从外部文件获取输入
- 读/写同一个文件(获取gmon.out)
- 从二进制文件获取输入时发生访问冲突错误
- 从特定文件获取函数指针