使用 exuberant-ctags 时,您使用什么选项?
使用 exuberant-ctags 5.8 for gcc 4.4.3 c89
我刚刚开始使用 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
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为这些都不是矫枉过正,但是您可能想调查 CScope 以“将其带到下一个级别”。看起来您可能正在挤压 ctags 的最大可用空间,而这正是 CScope 发挥作用的地方。
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.
我不会说这是过度杀伤力,但我会打开 m (结构和联合成员搜索非常好)
如果您从命令行或使用支持它的编辑器(例如 gvim)工作,Ctags 一般来说是好的。如果您确实想要高级功能,我建议您选择一个好的 IDE。有些事情你根本无法直接使用 ctags 完成(例如调用hireachy,或者重构,而具有良好 C/C++ 索引支持的优秀 IDE 将为你提供这些功能)
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)