簡體   English   中英

我只能從帶有Ctags的C ++文件中獲取#include嗎?

[英]Can I get only the #includes from C++ files with Ctags?

是否可以從帶有Exuberant CtagsUniversal 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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM