When using exuberant-ctags what options to you use?
Asked Answered
P

2

18

Using exuberant-ctags 5.8 for gcc 4.4.3 c89

I am just started using exuberant-ctags and I am just wondering what options do you add.

Here is a list and I am just wondering added too many could it be over kill.

$ 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]

I was going to use the following:

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

I am just wondering: is that overkill?

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
Pancreatin answered 7/9, 2010 at 4:21 Comment(0)
C
8

I wouldn't say it is overkill, I would turn on m though (structs and union member searching is very good)

Ctags in general is good if you are working from the command line or with an editor that supports it (gvim for example). If you really want advanced features I'd recomend going for a good IDE. There are somethings you simply can't do directly with ctags (such as call hireachy, or refactoring which a good IDE with good C/C++ indexing support will give you)

Comfit answered 21/9, 2010 at 0:21 Comment(0)
B
4

I don't think any of these are overkill, however you might want to investigate CScope to 'take it to the next level'. It seems like you might be squeezing the maximum you'll be able to get out of ctags and thats where CScope picks up.

Berty answered 20/9, 2010 at 7:20 Comment(1)
But Cscope does not support c++. universal-ctags is the way to go hereBaleen

© 2022 - 2024 — McMap. All rights reserved.