博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
cscope数据库生成脚本
阅读量:4151 次
发布时间:2019-05-25

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

#!/bin/shfind $(pwd) -name "*.h" -o -name "*.c" -o -name "*.cc" > cscope.filescscope -bkq -i cscope.filesctags -R
将以上代码保存为.sh文件,例如cs.sh,然后终端中修改其属性,增加执行属性;

将以下内容增加到 .vimrc 内

" tags 设置set tags=tags;    set autochdirif has("cscope")    set csprg=/usr/bin/cscope    "指定用来执行 cscope 的命令    set csto=1    "先搜索tags标签文件,再搜索cscope数据库    set cst    "使用|:cstag|(:cs find g),而不是缺省的:tag    set nocsverb    "不显示添加数据库是否成功    " add any database in current directory    if filereadable("cscope.out")        cs add cscope.out    "添加cscope数据库    endif    "显示添加成功与否    set csverbendif:set cscopequickfix=s-,c-,d-,i-,t-,e-nmap 
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("
")
运行cs.sh,此后可以参考其他的教程~~

转载地址:http://afmti.baihongyu.com/

你可能感兴趣的文章
android中使用TextView来显示某个网址的内容,使用<ScrollView>来生成下拉列表框
查看>>
andorid里关于wifi的分析
查看>>
Spring MVC和Struts2的比较
查看>>
Hibernate和IBatis对比
查看>>
Spring MVC 教程,快速入门,深入分析
查看>>
Android 的source (需安装 git repo)
查看>>
Commit our mod to our own repo server
查看>>
LOCAL_PRELINK_MODULE和prelink-linux-arm.map
查看>>
Simple Guide to use the gdb tool in Android environment
查看>>
Netconsole to capture the log
查看>>
Build GingerBread on 32 bit machine.
查看>>
How to make SD Card world wide writable
查看>>
Detecting Memory Leaks in Kernel
查看>>
Linux initial RAM disk (initrd) overview
查看>>
Timestamping Linux kernel printk output in dmesg for fun and profit
查看>>
There's Much More than Intel/AMD Inside
查看>>
CentOS7 安装MySQL 5.6.43
查看>>
使用Java 导入/导出 Excel ----Jakarta POI
查看>>
本地tomcat 服务器内存不足
查看>>
IntelliJ IDAE 2018.2 汉化
查看>>