ctags和cscope配置

1

~/.bashrc

export CSCOPE_DB=/root/cpptest/redis-4.0.11(cscope.out的路径)

2

~/.vimrc

set nu
set tags=tags;
set autochdir

3

~/.vim/plugin/cscope_maps.vim

部分略去
" use both cscope and ctag for ‘ctrl-]’, ‘:ta’, and ‘vim -t’
set cscopetag

" check cscope for definition of a symbol before checking ctags: set to 1
" if you want the reverse search order.
set csto=0

" add any cscope database in current directory
if filereadable(“cscope.out”)
cs add cscope.out
" else add the database pointed to by environment variable
elseif $CSCOPE_DB != “”
cs add $CSCOPE_DB
endif

" show msg when any other cscope db added
set cscopeverbose
部分略去

猜你喜欢

转载自blog.csdn.net/gyhwind/article/details/102328176
今日推荐