博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
cscope usage
阅读量:4970 次
发布时间:2019-06-12

本文共 2125 字,大约阅读时间需要 7 分钟。

1) Reference:

2) cscope help:

:help cscope

:help cscope-suggestions

:cs help

3) Generate index files:

find fullpath/of/your/project –type f > cscope.files

cscope -bq

4) cscope command:

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

5) Add cscope setting in .vimrc:

if has("cscope")       set csprg=/usr/local/bin/cscope       set csto=0       set cst       set nocsverb       " add any database in current directory       if filereadable("cscope.out")             cs add cscope.out       " else add database pointed to by environment       elseif $CSCOPE_DB != ""             cs add $CSCOPE_DB     endif     set csverb endifnmap 
s :cs find s
=expand("
")
nmap
g :cs find g
=expand("
")
nmap
c :cs find c
=expand("
")
nmap
t :cs find t
=expand("
")
nmap
e :cs find e
=expand("
")
nmap
f :cs find f
=expand("
")
nmap
i :cs find i ^
=expand("
")
$
nmap
d :cs find d
=expand("
")
" Using 'CTRL-spacebar' then a search type makes the vim window " split horizontally, with search result displayed in " the new window.nmap
s :scs find s
=expand("
")
nmap
g :scs find g
=expand("
")
nmap
c :scs find c
=expand("
")
nmap
t :scs find t
=expand("
")
nmap
e :scs find e
=expand("
")
nmap
f :scs find f
=expand("
")
nmap
i :scs find i ^
=expand("
")
$
nmap
d :scs find d
=expand("
")
" Hitting CTRL-space *twice* before the search type does a vertical " split instead of a horizontal onenmap
s \:vert scs find s
=expand("
")
nmap
g \:vert scs find g
=expand("
")
nmap
c \:vert scs find c
=expand("
")
nmap
t \:vert scs find t
=expand("
")
nmap
e \:vert scs find e
=expand("
")
nmap
i \:vert scs find i ^
=expand("
")
$
nmap
d \:vert scs find d
=expand("
")

 

转载于:https://www.cnblogs.com/tanghuimin0713/p/5992498.html

你可能感兴趣的文章
JSON 解析器。JSON.stringify和JSON.parse
查看>>
中国历史上成功的两人合作, 改进, 提高的例子
查看>>
Objective-C中的属性机制
查看>>
JS基础
查看>>
Django-ORM操作
查看>>
重启流程 杀死流程 结束流程 指定到工作项 工作项状态标志
查看>>
《Android虚拟机》----Android系统的结构
查看>>
[洛谷P2763]试题库问题
查看>>
Java TCP/UDP网络通信编程
查看>>
MOSS/Sharepoint 如何更改一台已经安装了SharePoint的服务器名称
查看>>
关于Staruml与powerdesigner启动使用中的问题
查看>>
[Browser] 清Cache
查看>>
!JS实战之随机像素图
查看>>
UTF-8笔记170330
查看>>
[BAT]cmd命令之 cd /d %~dp0
查看>>
adb(7)-模拟按键/输入
查看>>
Python学习3月8号【python编程 从入门到实践】---》笔记(1)
查看>>
MySQL SQL优化
查看>>
文本框textarea实时提示还可以输入多少文字
查看>>
pyfits fits图像区域选择
查看>>