sudo apt-get install cscope
I have the cscope_maps.vim file(check turtoial ), and the .vimrc thing from Vim Tips Wiki , but removed the quick fix part, as suggested by the . After removed the quick fix part, all duplicated symbol will ask for selection, even for tags!!!
cscope -Rbk -s XXXX
-R Recurse subdirectories during search for source files.Cscope interactive
-b Build the cross-reference only.-q Enable fast symbol lookup via an inverted index.
-k ``Kernel Mode'', turns off the use of the default include dir (usually /usr/include) when building the database, since kernel source trees generally do not use it.
-sdir Look in dir for additional source files. This option is ignore if source files are given on the command line.
-q Enable fast symbol lookup via an inverted index.
-C Ignore letter case when searching.
-d Do not update the cross-reference.
^d: Exit cscope.
: Alternate between the menu and the list of matching lines
c: Find functions calling this function (caller)
d: Find functions called by this function (callee)
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 this text string
 Vim/Cscope tutorial
Vi with Cscope
 Cscope - Vim Tips Wiki - Wikia
- Building database for Cscope:
$ cscope -Rb
This command makes the Cscope parse all the subdirectories (-R option) and exit without entering awkward Cscope interface.
- List all the uses of the symbol under the cursor:
That is Control-backslash and then 's'. Select one of items in the list and hit enter, you will jump to the that use.
- Find functions that under the cursor
That is Control-backslash and then 'd'.
- Open the file with filename under cursor
That is Control-backslash and then 'f'.
- Jump back from most recent jumping-off point:
A Collection of Vi Tips
 Vi + Cscope: using "cscope find c function" in vim, finds multiple results, how to go next - Stack Overflow
linux - How to set vim as default cscope editor? - Stack Overflow
Using Cscope on large projects (example: the Linux kernel)