Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When using exuberant-ctags what options to you use?

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
like image 513
ant2009 Avatar asked Sep 07 '10 04:09

ant2009


2 Answers

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)

like image 199
hhafez Avatar answered Oct 24 '22 22:10

hhafez


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.

like image 4
synthesizerpatel Avatar answered Oct 24 '22 22:10

synthesizerpatel