cscope usage
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=
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 endif
nmap <C-_>s :cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-_>g :cs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-_>c :cs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-_>t :cs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-_>e :cs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-_>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-_>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-_>d :cs find d <C-R>=expand("<cword>")<CR><CR>
" Using 'CTRL-spacebar' then a search type makes the vim window
" split horizontally, with search result displayed in
" the new window.
nmap <C-Space>s :scs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space>g :scs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space>c :scs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space>t :scs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space>e :scs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space>f :scs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-Space>i :scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-Space>d :scs find d <C-R>=expand("<cword>")<CR><CR>
" Hitting CTRL-space *twice* before the search type does a vertical
" split instead of a horizontal one
nmap <C-Space><C-Space>s \:vert scs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space><C-Space>g \:vert scs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space><C-Space>c \:vert scs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space><C-Space>t \:vert scs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space><C-Space>e \:vert scs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space><C-Space>i \:vert scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-Space><C-Space>d \:vert scs find d <C-R>=expand("<cword>")<CR><CR>
cscope usage的更多相关文章
- 将Vim改造为强大的IDE—Vim集成Ctags/Taglist/Cscope/Winmanager/NERDTree/OmniCppComplete(有图有真相)(转)
1.安装Vim和Vim基本插件首先安装好Vim和Vim的基本插件.这些使用apt-get安装即可:lingd@ubuntu:~/arm$sudo apt-get install vim vim-scr ...
- 〖Linux〗(2013.08.02)使用ctag+cscope查看Android源代码
1. 安装ctags和cscope sudo apt-get install -y exuberant-ctags cscope 2. vimrc中的配置 """&quo ...
- vim插件cscope使用方法
一.安装cscope 安装方式比较多样,可以在各自linux软件管理工具中安装,也可以去官网下载安装. sudo apt-get install cscope 二.插件安装 这里选择的是Vundle来 ...
- 安装windows下的Cscope
http://blog.csdn.net/maxiee/article/details/10034263 Cscope 是一款用于查看大型工程中的代码的软件.它使用方便,支持快速查找 C Symbol ...
- intellij IDEA 出现“Usage of API documented as @since 1.6+”的解决办法
问题 在导入java.io.console的时候出现"Usage of API documented as @since 1.6+"
- Disk Space Usage 术语理解:unallocated, unused and reserved
通过standard reports查看Disk Usage,选中Database,右击,选择Reports->Standard Reports->Disk Space Usage,截图如 ...
- OpenCascade MeshVS Usage
OpenCascade MeshVS Usage eryar@163.com Abstract. MeshVS means Mesh Visualization Service. It can be ...
- Usage: AddDimensionedImage imageFile outputFile eclipse 运行程序出错
关于这个在eclipse中运行java程序的错,首先确认你的jdk,jre是否完整,并且与你的eclipse的位数相同,当然我相信这个错误大家应该都会去检查到. 第二个关于addDimensioned ...
- Please allow Subclipse team to receive anonymous usage statistics for this Eclipse intance(info)
本文转载自:http://blog.csdn.net/myfxx/article/details/21096949 今天在用eclipse启动项目的时候发现了一个问题,就是每次启动项目的时候,ecli ...
随机推荐
- [译]GLUT教程 - 键盘
Lighthouse3d.com >> GLUT Tutorial >> Input >> Keyboard GLUT可以让应用程序自动监测键盘输入,包括普通按键和 ...
- find - exec 命令
find是我们很常用的一个Linux命令,但是我们一般查找出来的并不仅仅是看看而已,还会有进一步的操作,这个时候exec的作用就显现出来了. exec解释: -exec 参数后面跟的是command ...
- hive中遇到的问题
) from t_1 where country ='China' group by (name = 'qq'); 结果图 select * from t_sz_part; 按照理解来说,应该只有一个 ...
- 2013 年最好的 20 款免费 jQuery 插件
2013 年最好的 20 款免费 jQuery 插件 oschina 发布于: 2014年01月11日 (8评) 分享到 新浪微博腾讯微博 收藏+99 互联网上面有很多 jQuery 插件,这里我们 ...
- Elasticsearch5.3 学习(一):安装、Yii2.0 下载es扩展
Elasticsearch是一个基于Lucene,提供了一个分布式多用户能力的全文搜索引擎.其他就不多说了,官方文档有详细的介绍. 我自己是在CentOS 7.0安装的 Elasticsearch 是 ...
- android requestLayout()重新请求布局
在应用中有时会遇到,例如你listView 的设置的高度为warp_content 自适应,listView下方有个TextView但如果你删了一个listView的item 我们希望下面的TextV ...
- dynamic_cast, RTTI, 整理
主要是参考下图,了解内存布局,然后写个实例程序就差不多明白了,但是需要熟悉指针转换. 1) 只有多态类才有RTTI信息,dynamic_cast正是运用RTTI进行转换,属于运行时类型检查. 2) d ...
- 如何通过Google访问外网
修改host: https://laod.cn/hosts/2017-google-hosts.html google中文: https://www.google.com.hk/ 弄好前两项后,可以再 ...
- Unity3d 中文菜单
- Hibernate 表连接hql语句
现有两个表 user 表 和 VIPcard 表 UserVo user VIPcardVo 中含有 UserVo user select v from VIPCardVo v left join ...