天天看點

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>