I'm using gvim/vim with cscope/ctags to find a symbol definition in the linux kernel. The source code is huge. when I want to search for the structure device with "tag device" command as example, vim will propose me hundred of occurrences. because it will propose global variable named device, structure's member that are named device. Is there anyway to improve this? Is it possible to tell vim/cscope/tag to look only for structure definition?
This, you might have known already. I narrow it down by cscope vim command
:cs f e struct device {
Please refer the usage of cscope vim commands
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With