~gpanders/dotfiles

ref: 2da1dde5ea566f82ebe6532bc6d3b8670fd77ce8 dotfiles/vim/.vim/plugin/cscope.vim -rw-r--r-- 992 bytes
2da1dde5Greg Anders Note 'open' subcommand opens editor in NOTES_DIR when no argument given 1 year, 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
" cscope
" Author: Greg Anders <greg@gpanders.com>
" Date: 2019-08-05

if !has('cscope') || !executable('cscope') || exists('g:loaded_cscope')
  finish
endif
let g:loaded_cscope = 1

if filereadable(expand($CSCOPE_DB))
  set cscoperelative
  silent cscope add $CSCOPE_DB
elseif filereadable('cscope.out')
  silent cscope add cscope.out
else
  finish
endif
set cscopetag
set cscopepathcomp=2

" See :h cscope-find for details
nnoremap <C-_>s :cscope find s <C-R>=expand('<cword>')<CR><CR>
nnoremap <C-_>g :cscope find g <C-R>=expand('<cword>')<CR><CR>
nnoremap <C-_>c :cscope find c <C-R>=expand('<cword>')<CR><CR>
nnoremap <C-_>t :cscope find t <C-R>=expand('<cword>')<CR><CR>
nnoremap <C-_>e :cscope find e <C-R>=expand('<cword>')<CR><CR>
nnoremap <C-_>f :cscope find f <C-R>=expand('<cfile>')<CR><CR>
nnoremap <C-_>i :cscope find i <C-R>=expand('<cfile>')<CR><CR>
nnoremap <C-_>d :cscope find d <C-R>=expand('<cword>')<CR><CR>
nnoremap <C-_>a :cscope find a <C-R>=expand('<cword>')<CR><CR>