標題: 使用 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 就顯示沒有鏈接,太奇怪了