vim+ctags+cscope在mac os上的应用 时,经常出现 使用cscope老是出现一些E259: no matches found for csope query 问题。
在网上看了一下,有人说是源代码是 dos格式,不是unix格式导致的,其实经过检查,应该不是这个原因;
真正的原因是,用下面的命令生成cscope数据文件:出错了
- find . -name "*.h" -o -name "*.c" -o -name "*.m" >cscope.files
- find ./ -name "*.h" -o -name "*.c" -o -name "*.m" >cscope.files
-
- 重新更新产生,cscope.out 后(相关命令脚本,请搜索网络), 再使用cscope的命令:就没有什么问题了。
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 this text string
help : Show this message (Usage: help)
kill : Kill a connection (Usage: kill #)
reset: Reinit all connections (Usage: reset)
show : Show connections (Usage: show)