ubuntu cscope

王朝学院·作者佚名  2016-05-27
窄屏简体版  字體: 小  |  中  |  大  |  超大  

Ubuntu cscopeadd 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"

 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
© 2005- 王朝網路 版權所有 導航