ubuntu cscope

add the following text to .vimrc or .gvimrc:

if has("cscope")
    set csprg=/usr/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

endif

nmap <[email protected]>s :cs find s
<C-R>=expand("<cword>")<CR><CR>

nmap <[email protected]>g :cs find g <C-R>=expand("<cword>")<CR><CR>
nmap <[email protected]>c :cs find c <C-R>=expand("<cword>")<CR><CR>
nmap <[email protected]>t :cs find t <C-R>=expand("<cword>")<CR><CR>
nmap <[email protected]>e :cs find e <C-R>=expand("<cword>")<CR><CR>
nmap <[email protected]>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <[email protected]>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <[email protected]>d :cs find d <C-R>=expand("<cword>")<CR><CR>
当光标停在某个你要查找的词上时, 按下<C-_>g, 就是查找该对象的定义, 其
他的同理.
按这种组合键有一点技巧,按了<C-_>后要马上按下一个键,否则屏幕一闪就回到
nomal状态了
<C-_>g的按法是先按"Ctrl+Shift+-", 然后很快再按"s"

ubuntu cscope,码迷,mamicode.com

时间: 2024-08-16 16:44:43

ubuntu cscope的相关文章

Ubuntu配置EMACS cscope

apt-get install cscope apt-get install cscope-el cp /usr/share/emacs/site-lisp/cscope/xcscope.el ~/.emacs.d/site-lisp/ ;;LOAD_PATH (add-to-list 'load-path' "~/.emacs.d/site-lisp") (add-to-list 'load-path' "/usr/share/emacs/site-lisp/")

Ubuntu下使用sublime text 3安装插件Package Control+cTags+Cscope后查看源码利器

1.安装Package Control : http://jingyan.baidu.com/article/d3b74d64a302631f77e609fa.html 2.安装cTags插件: http://jingyan.baidu.com/article/656db9189c9761e381249cf5.html 3.安装Cscope插件 1. 通过 Preference -> Package Control -> Install Package安装Cscope插件 2. 安装Cscop

ubuntu 源码编译安装最新的vim 8.0

为什么要源码编译安装VIM? 因为我要安装ycm,ycm要求vim版本为8.0 教程步骤: 1, 核对系统版本 2, 删除系统自带的vim 3, 编译安装vim 4, 检验vim的安装 1,核对系统版本 [email protected]:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 Codename: tr

Ubuntu 14.04 安装配置备忘录

完全在 Linux 下工作,大概有3年时间了. 之前都是用 Windows, 而把 Linux 装在虚拟机里,现在反过来,把 Windows 装在了虚拟机里,只是因为偶尔还要用网银的缘故. 以我这几年的使用经验, 一句话: Linux 用过之后就回不去了. 以下记录我的 Ubuntu 14.04 Linux 安装配置, 算是备忘录. 需要说明的一点是: 我从来不觉得使用 Debian, CentOS, 或者 Arch, Gentoo 的人很牛, 只能说明你们不珍惜时间,就爱瞎折腾, 当然如果你是

[原创]安装Ubuntu Server 14.04后

安装后许多软件都没有,需要进行安装. 官方指南:https://help.ubuntu.com/lts/serverguide/index.html 1.修改网络配置文件 用ifconfig查看本地网卡,获得网卡名称 p2p1,如果只有lo,则执行 dmesg | grep eth. 修改/etc/network/interfaces文件,这个配置更新过,加入了dns的配置 sudo vim /etc/network/interfaces iface eth0 inet static addre

使用 vim + ctags + cscope + taglist 阅读源码

转自:http://my.oschina.net/u/554995/blog/59927 最近,准备跟学长一起往 linux kernel 的门里瞧瞧里面的世界,虽然我们知道门就在那,但我们还得找到合适的角度才会看得更舒服,对吧^_^ . 阅读源码的工具有很多,而且如今的集成开发环境(IDE)也很强大,但对于经常使用vim编辑器的程序员来说,对vim的强大绝对是“不抛弃,不放弃”的,况且我们只要安装一些插件配合vim的工作一样能达到IDE的效果,好了,废话少说.浏览了很多有关的网页资源后,发现有

ubuntu 16.04安装mysql-server_5.7.17

在MySQL官网上下载最新版的Ubuntu Linux专用的MySQL.我这里下载的是: mysql-server_5.7.17-1ubuntu16.04_amd64.deb-bundle.tar 也可从以下mirrors下载: http://mirrors.sohu.com/mysql/MySQL-5.7/ 解压文件 命令为: [email protected]:/# tar -zxvf mysql-server_5.7.17-1ubuntu16.04_amd64.deb-bundle.tar

ubuntu下如何配置codeblocks字体颜色主题

1.在ubuntu的home中ctrl+h显示隐藏文件夹,找到一个.codeblocks的文件夹,然后那个文件夹中有一个default.conf的文件,选择打开方式gedit.然后将下面的代码复制进去,在复制进去之前,最好将你自己的配置文件备份好. 配置代码: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocksConfig version=&q

ubuntu下定制Vim/Gvim及使用技巧

vim是linux下的编辑器之神,是玩linux的必备工具,同样emacs是神的编辑器,两个编辑器是各有千秋,看个人的喜好,青菜萝卜各有所爱.我是比较喜欢vim,用vim编写bash,perl,python脚本,以及修改配置文件等等,本文就主要介绍在Ubuntu下gvim环境的搭建,希望对大家有所帮助. 一. Ubuntu安装gvim方法 安装gvim的方法,最简单方法是在Ubuntu软件中心搜索gvim,然后点击安装即可,如下图: 如果使用命令行可以打开终端,输入sudo apt-get in