diff options
| author | Marc Vertes <mvertes@free.fr> | 2022-03-10 09:18:57 +0100 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2022-03-10 09:18:57 +0100 |
| commit | c3779261fadc809c2785401dc42009c5d55cebba (patch) | |
| tree | 421530a93aabe0a93b0b42e5e51b0fab4acc2858 /.vimrc | |
| parent | 1e1a1087f799632c021af612eb3c919cf1143237 (diff) | |
vim: improve cscope
Diffstat (limited to '.vimrc')
| -rw-r--r-- | .vimrc | 28 |
1 files changed, 20 insertions, 8 deletions
@@ -91,11 +91,23 @@ noremap <C-p> :Files<cr> " 'i' includes: find files that include the filename under cursor " 'd' called: find functions that function under cursor calls -noremap <leader>s :cs find s <C-R>=expand("<cword>")<CR><CR><tab> -noremap <leader>g :cs find g <C-R>=expand("<cword>")<CR><CR><tab> -noremap <leader>c :cs find c <C-R>=expand("<cword>")<CR><CR><tab> -noremap <leader>t :cs find t <C-R>=expand("<cword>")<CR><CR><tab> -noremap <leader>e :cs find e <C-R>=expand("<cword>")<CR><CR><tab> -noremap <leader>i :cs find i <C-R>=expand("<cfile>")<CR><CR><tab> -noremap <leader>f :cs find f <C-R>=expand("<cfile>")<CR><CR><tab> -noremap <leader>d :cs find d <C-R>=expand("<cword>")<CR><CR><tab> +if has("cscope") + set csto=0 + set cst + set nocsverb + if filereadable("cscope.out") + cs add cscope.out + elseif $CSCOPE_DB + cs add $CSCOPE_DB + endif + set csverb +endif + +nmap <leader>cs :cs find s <C-R>=expand("<cword>")<CR><CR> +nmap <leader>cg :cs find g <C-R>=expand("<cword>")<CR><CR> +nmap <leader>cc :cs find c <C-R>=expand("<cword>")<CR><CR> +nmap <leader>ct :cs find t <C-R>=expand("<cword>")<CR><CR> +nmap <leader>ce :cs find e <C-R>=expand("<cword>")<CR><CR> +nmap <leader>ci :cs find i <C-R>=expand("<cfile>")<CR><CR> +nmap <leader>cf :cs find f <C-R>=expand("<cfile>")<CR><CR> +nmap <leader>cd :cs find d <C-R>=expand("<cword>")<CR><CR> |
