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 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("")
当光标停在某个你要查找的词上时, 按下g, 就是查找该对象的定义, 其
他的同理.
    按这种组合键有一点技巧,按了后要马上按下一个键,否则屏幕一闪就回到
nomal状态了
    g的按法是先按"Ctrl+Shift+-", 然后很快再按"s"

 

 

转载于:https://www.cnblogs.com/RobbieQiu/p/3674875.html

你可能感兴趣的:(ubuntu cscope)