我正在使用带有cscope/ctags的gvim/vim在Linux内核中查找符号定义。由于源代码非常庞大,因此当我想要使用“tag device”命令搜索结构设备时,vim会提示我数百个出现的结果,因为它会提供名为device的全局变量和被命名为device的结构成员。有没有办法改善这种情况?是否可以告诉vim/cscope/tag只查找结构定义?
我正在使用带有cscope/ctags的gvim/vim在Linux内核中查找符号定义。由于源代码非常庞大,因此当我想要使用“tag device”命令搜索结构设备时,vim会提示我数百个出现的结果,因为它会提供名为device的全局变量和被命名为device的结构成员。有没有办法改善这种情况?是否可以告诉vim/cscope/tag只查找结构定义?
:cs f e struct device {
cscope commands:
add : Add a new database (Usage: add file|dir [pre-path] [flags])
find : Query for a pattern (Usage: find c|d|e|f|g|i|s|t name)
c: Find functions calling this function
d: Find functions called by this function
e: Find this egrep pattern
f: Find this file
g: Find this definition
i: Find files #including this file
s: Find this C symbol
t: Find assignments to
help : Show this message (Usage: help)
kill : Kill a connection (Usage: kill #)
reset: Reinit all connections (Usage: reset)
show : Show connections (Usage: show)