diff options
| author | Marc Vertes <mvertes@free.fr> | 2022-05-13 13:51:25 +0200 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2022-05-13 13:51:25 +0200 |
| commit | efdf5b1b435d2c90b1ba6650dc50e2d20441fd8f (patch) | |
| tree | 5cf382705d920264ddf5278b21f0e6f9c6220b59 /.vimrc | |
| parent | cba68be4f36e9a1d34bc7a2d88ceda7a08ea0ddd (diff) | |
| parent | c3779261fadc809c2785401dc42009c5d55cebba (diff) | |
Merge branch 'master' of github.com:mvertes/dotfiles
Diffstat (limited to '.vimrc')
| -rw-r--r-- | .vimrc | 43 |
1 files changed, 19 insertions, 24 deletions
@@ -93,28 +93,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> - - -function! CloseOnLast() - let cnt = 0 - for i in range(0, bufnr("$")) - if buflisted(i) - let cnt += 1 - endif - endfor - if cnt <= 1 - q - else - bd +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 -endfunction - -"noremap <leader><leader> :call CloseOnLast()<cr> + 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> |
