in command line
cscope -Rbq)
run the command in vim
cscope add cscope.out
【转】cscope 用法
由于公司的代码有点大,光用grep个人感觉太慢了,所以就到网上去找了找cscope的用法。感觉也挺实用的。
以下命令,用来生成cscope的索引文件,
find . -name "*.h" -o -name "*.c" > cscope.files
cscope -bkq -i cscope.files
然后就可以在vim里使用了,加粗的那几个,用的比较多点。
find : Query cscope. All cscope query options are available
except option #5 ("Change this grep pattern").
USAGE :cs find {querytype} {name}
0 or s: Find this C symbol
1 or g: Find this definition
2 or d: Find functions called by this function
3 or c: Find functions calling this function
4 or t: Find this text string
6 or e: Find this egrep pattern
7 or f: Find this file
8 or i: Find files #including this file
以下命令,用来生成cscope的索引文件,
find . -name "*.h" -o -name "*.c" > cscope.files
cscope -bkq -i cscope.files
然后就可以在vim里使用了,加粗的那几个,用的比较多点。
find : Query cscope. All cscope query options are available
except option #5 ("Change this grep pattern").
USAGE :cs find {querytype} {name}
0 or s: Find this C symbol
1 or g: Find this definition
2 or d: Find functions called by this function
3 or c: Find functions calling this function
4 or t: Find this text string
6 or e: Find this egrep pattern
7 or f: Find this file
8 or i: Find files #including this file