标题: 使用 cscope 的时候总是提示没有连接 [打印本页] 作者: wood8 时间: 2016-07-11 16:35 标题: 使用 cscope 的时候总是提示没有连接 请各位大侠帮忙给看看:
需要手动运行:cs add cscope.out 才能正常使用
.vimrc中 cscope 相关配置如下:
"Settings for cscope
if has("cscope")
if filereadable("/usr/bin/cscope")
set csprg=/usr/bin/cscope " specify which cscope to be used
elseif filereadable("/usr/local/bin/cscope")
set csprg=/usr/local/bin/cscope " specify which cscope to be used
endif
set csto=0 " 0 means search cscope database first, then search tags file
set cst " use |:cstag|(:cs find g), not default :tag
set nocsverb " do not show if database is added successful
" add any database in current directory
if filereadable("cscope.out")
cscope add cscope.out " add cscope database
" else add database pointed to by environment
elseif $CSCOPE_DB != ""
cscope add $CSCOPE_DB
endif
set csverb " show if database is added successful
endif 作者: MMMIX 时间: 2016-07-12 14:24 回复 1# wood8
切换到 cscope.out 所在的目录下,然后再启动 Vim 试下。作者: wood8 时间: 2016-07-12 15:53 回复 2# MMMIX
是在 cscope.out 所在目录运行的。
我加过一些代码
cscope add cscope.out
cs show
这个地方 cs show 就显示没有链接,太奇怪了