A simple, useful plugin to manage/query cscope database in Vim.
- Search source list (default:
cscope.files
) upward recursively. - Generate/refresh cscope database (default:
cscope.output
) easily. - Query cscope database without autojumping to first result, quite convenient!
if has("cscope")
" Use both cscope and ctag
set cscopetag
" Use tags for definition search first
set cscopetagorder=1
" Refresh cscope database
nnoremap ;r :call auto_cscope#RefreshCsdb()<CR>
" :cs find s <current word>
nnoremap ;s :call auto_cscope#CscopeQueryQF("s")<CR>
" :cs find g <current word>
nnoremap ;g :call auto_cscope#CscopeQueryQF("g")<CR>
" :cs find c <current word>
nnoremap ;c :call auto_cscope#CscopeQueryQF("c")<CR>
" :cs find d <current word>
nnoremap ;d :call auto_cscope#CscopeQueryQF("d")<CR>
endif
Use plugin manager is recommended.
Plug 'elsdrium/auto-cscope.vim'
Any suggestion/feedback/PR is appreciated.
MIT