aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-04-13 00:20:39 +0800
committerGuangxiong Lin <[email protected]>2022-04-13 00:20:39 +0800
commit75d59f4c076fcb899428ac263d4095469b4fbc88 (patch)
tree610b640ef0857939d4458594e70a864e1364e679
parentb295fedf20601bfc1b79589dc6bf69ce9681d9a1 (diff)
downloaddotfiles-75d59f4c076fcb899428ac263d4095469b4fbc88.tar.gz
dotfiles-75d59f4c076fcb899428ac263d4095469b4fbc88.tar.bz2
dotfiles-75d59f4c076fcb899428ac263d4095469b4fbc88.zip
Add keymap of cscope in vim
-rw-r--r--.vim/after/plugin/cscope.vim14
1 files changed, 14 insertions, 0 deletions
diff --git a/.vim/after/plugin/cscope.vim b/.vim/after/plugin/cscope.vim
new file mode 100644
index 0000000..8215e1d
--- /dev/null
+++ b/.vim/after/plugin/cscope.vim
@@ -0,0 +1,14 @@
+set cscopequickfix=s-,c-,d-,i-,t-,e-
+set cscopetag
+
+nmap <leader>css :cs find s <C-R>=expand("<cword>")<CR><CR>
+nmap <leader>csg :cs find g <C-R>=expand("<cword>")<CR><CR>
+nmap <leader>csc :cs find c <C-R>=expand("<cword>")<CR><CR> :copen<CR>
+nmap <leader>cst :cs find t <C-R>=expand("<cword>")<CR><CR> :copen<CR>
+nmap <leader>cse :cs find e <C-R>=expand("<cword>")<CR><CR> :copen<CR>
+nmap <leader>csf :cs find f <C-R>=expand("<cfile>")<CR><CR>
+nmap <leader>csi :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
+nmap <leader>csd :cs find d <C-R>=expand("<cword>")<CR><CR>
+nmap <leader>csa :cs find a <C-R>=expand("<cword>")<CR><CR>
+
+nmap <leader>cs<space> :cs find<space>