summaryrefslogtreecommitdiff
path: root/.vimrc
diff options
context:
space:
mode:
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc24
1 files changed, 24 insertions, 0 deletions
diff --git a/.vimrc b/.vimrc
index f002a86..4b239cd 100644
--- a/.vimrc
+++ b/.vimrc
@@ -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>