2010-09-07 56 views
14

對gcc使用exuberant-ctags 5.8 4.4.3 c89使用exuberant-ctags時使用哪些選項?

我剛開始使用exuberant-ctags,我只是想知道你添加了哪些選項。

這裏是一個列表,我只是想知道添加太多可能會被殺死。

$ ctags --list-kinds=c 
c classes 
d macro definitions 
e enumerators (values inside an enumeration) 
f function definitions 
g enumeration names 
l local variables [off] 
m class, struct, and union members 
n namespaces 
p function prototypes [off] 
s structure names 
t typedefs 
u union names 
v variable definitions 
x external and forward variable declarations [off] 

我會使用以下命令:

ctags -e --c-kinds=+defgpstux -R 

我只是想知道:是矯枉過正?

c classes      No -- I don't have any classes as this is c 
d macro definitions   YES -- I have many macros 
e enumerators (values inside an enumeration) YES 
f function definitions   YES 
g enumeration names   YES 
l local variables [off]  NO 
m class, struct, and union members NO 
n namespaces NO 
p function prototypes [off] YES 
s structure names    YES -- Is there any difference with m 
t typedefs      YES 
u union names     YES 
v variable definitions   NO 
x external and forward variable declarations [off] YES 

回答

7

我不會說這是矯枉過正,我會變成M上雖然(結構和工會成員的搜索是非常好的)

C標籤總的來說是好的,如果你是通過命令行或編輯工作支持它(例如gvim)。如果你真的想要高級功能,我會推薦一個好的IDE。有些東西你根本無法直接使用ctags(例如調用hireachy,或者重構具有良好C/C++索引支持的良好IDE會給你)

3

我不認爲任何這些都是矯枉過正,但您可能需要調查CScope到「把它帶到一個新的水平」。看起來你可能會擠壓最大限度的你能夠擺脫ctags以及CScope挑選的那些。

+1

但是Cscope不支持C++。通用ctags是去這裏的路 – Pascalius 2015-11-05 11:09:12

相關問題