diff options
| author | Marc Vertes <mvertes@free.fr> | 2022-02-10 15:37:20 +0100 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2022-02-10 15:37:20 +0100 |
| commit | 3601cdd9b978876ad76a05485e5580aa1124ad21 (patch) | |
| tree | e3f509974b15834646e1000f7280f0f325f3aad4 /.vimrc | |
| parent | e200c8d78ca1d3388c25c1cef8892b1dd015bbf7 (diff) | |
vim: improve cscope mapping
Diffstat (limited to '.vimrc')
| -rw-r--r-- | .vimrc | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -8,6 +8,8 @@ filetype plugin on filetype plugin indent on let mapleader = "," +set guifont=6x13:h13 + set rtp+=/opt/homebrew/opt/fzf let g:fzf_preview = 'cat {}' @@ -77,3 +79,25 @@ noremap <leader><leader> :bd<cr> noremap <leader>o :!open <cWORD>&<cr><cr> noremap <C-g> :tag <c-r><c-w><cr> noremap <C-p> :Files<cr> + +""""""""""""" My cscope/vim key mappings + " + " The following maps all invoke one of the following cscope search types: + " + " 's' symbol: find all references to the token under cursor + " 'g' global: find global definition(s) of the token under cursor + " 'c' calls: find all calls to the function name under cursor + " 't' text: find all instances of the text under cursor + " 'e' egrep: egrep search for the word under cursor + " 'f' file: open the filename under cursor + " '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> |
