Skip to content

Instantly share code, notes, and snippets.

@iakio
Created July 27, 2011 06:20
Show Gist options
  • Save iakio/1108783 to your computer and use it in GitHub Desktop.
Save iakio/1108783 to your computer and use it in GitHub Desktop.
$ find path_to_sourcedir/ -name '*.php' > cscope.files
$ cscope -b
$ cat ~/.vimrc
...
if has('cscope')
nnoremap <Leader>s :<C-u>scs find s <C-R>=expand("<cword>")<CR><CR>
nnoremap <Leader>g :<C-u>scs find g <C-R>=expand("<cword>")<CR><CR>
nnoremap <Leader>c :<C-u>scs find c <C-R>=expand("<cword>")<CR><CR>
nnoremap <Leader>t :<C-u>scs find t <C-R>=expand("<cword>")<CR><CR>
nnoremap <Leader>e :<C-u>scs find e <C-R>=expand("<cword>")<CR><CR>
nnoremap <Leader>f :<C-u>scs find f <C-R>=expand("<cword>")<CR><CR>
set cscopetagorder=0 cscopequickfix=s-,c-,i-,t-,e- nocscopetag
if cscope_connection() == 0 && filereadable('cscope.out')
cscope add cscope.out
endif
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment