首页 > 系统 > Ubuntu > 正文

ubuntu cscope

2024-06-28 13:26:37
字体:
来源:转载
供稿:网友
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 <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>
当光标停在某个你要查找的词上时, 按下<C-_>g, 就是查找该对象的定义, 其他的同理.    按这种组合键有一点技巧,按了<C-_>后要马上按下一个键,否则屏幕一闪就回到nomal状态了    <C-_>g的按法是先按"Ctrl+Shift+-", 然后很快再按"s"


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表