summaryrefslogtreecommitdiff
path: root/.vimrc
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2022-05-13 13:51:25 +0200
committerMarc Vertes <mvertes@free.fr>2022-05-13 13:51:25 +0200
commitefdf5b1b435d2c90b1ba6650dc50e2d20441fd8f (patch)
tree5cf382705d920264ddf5278b21f0e6f9c6220b59 /.vimrc
parentcba68be4f36e9a1d34bc7a2d88ceda7a08ea0ddd (diff)
parentc3779261fadc809c2785401dc42009c5d55cebba (diff)
Merge branch 'master' of github.com:mvertes/dotfiles
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc43
1 files changed, 19 insertions, 24 deletions
diff --git a/.vimrc b/.vimrc
index 9a12605..858bc52 100644
--- a/.vimrc
+++ b/.vimrc
@@ -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>