Skip to content

Instantly share code, notes, and snippets.

@dweinstein
Created November 14, 2014 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dweinstein/5a6836ae5e3d42cd566a to your computer and use it in GitHub Desktop.
Save dweinstein/5a6836ae5e3d42cd566a to your computer and use it in GitHub Desktop.
cscope vim integration
" cscope options
if has("cscope")
set csprg=/usr/local/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
map g<C-]> :cs find 3 <C-R>=expand("<cword>")<CR><CR>
map g<C-\> :cs find 0 <C-R>=expand("<cword>")<CR><CR>
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment