Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
cscope quickref
==========================================
Setup
==========================================
Install (OSX) brew install cscope
Setup cscope.files find /path/to/src -name '*.<file ext>' > /path/to/src/cscope.files
Create/recreate db cscope -b -q
==========================================
Using in Vim
==========================================
Add new cscope database connection :cs add {file|dir}
Find this C symbol :cs find {0|s} <symbol name>
Find this definition :cs find {1|g} <definition name>
Find functions called by this function :cs find {2|d} <function name>
Find functions calling this fuction :cs find {3|c} <function name>
Find this text string :cs find {4|t} <text>
Find this egrep pattern :cs find {6|e} <pattern>
Find this file :cs find {7|f} <filename>
Find files #including this file :cs find {8|i} <filename>
Help :cs help
Show cscope connections :cs show
Reinit all cscope connections :cs reset
Kill cscope connection :cs kill {number|partial_name}
Show documentation :help if_cscop.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment