1
0
mirror of https://github.com/amix/vimrc synced 2025-02-28 14:12:51 +08:00

add ctags and cscope config

This commit is contained in:
qhuang 2013-05-07 19:42:53 +08:00
parent d10a304cd0
commit a9dd486360
2 changed files with 41 additions and 0 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ sources_non_forked/ack.vim/.netrwhist
temp_dirs/yankring_history_v2.txt
sources_forked/yankring/doc/tags
sources_non_forked/tlib/doc/tags
systags

View File

@ -5,3 +5,43 @@ set nu
" the color I used to
colorscheme desert
""""""""""""""""""""""""
" [my plugin setup]
"
" ctags
set tags=tags;
set tags+=~/.vim/systags
set autochdir
" cscope
if has("cscope")
set csprg=/usr/bin/cscope
set csto=1
set cst
if filereadable("cscope.out")
cs add cscope.out .
elseif filereadable("../cscope.out")
cs add ../cscope.out ..
elseif filereadable("../../cscope.out")
cs add ../../cscope.out ../..
elseif filereadable("../../../cscope.out")
cs add ../../../cscope.out ../../..
elseif filereadable("../../../../cscope.out")
cs add ../../../../cscope.out ../../../..
elseif filereadable("../../../../../cscope.out")
cs add ../../../../../cscope.out ../../../../..
elseif filereadable("../../../../../../cscope.out")
cs add ../../../../../../cscope.out ../../../../../..
endif
set csverb
endif
nmap <C-@>s :cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>g :cs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>c :cs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>t :cs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>e :cs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>f :cs find f <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>i :cs find i ^<C-R>=expand("<cword>")<CR>$<CR>
nmap <C-@>d :cs find d <C-R>=expand("<cword>")<CR><CR>