自動加載cscope.out中我想自動加載我cscope.out
在我的項目的子目錄,所以我在.vimrc
添加這個腳本,如下所示:如何在VIM
set cscopequickfix=s-,c-,d-,i-,t-,e-
if has("cscope")
set csprg=/usr/bin/cscope
set csto=1
set cst
set csverb
set cspc=3
"add any database in current dir
if filereadable("cscope.out")
cs add cscope.out
"else search cscope.out elsewhere
else
let cscope_file=findfile("cscope.out", ".;")
"echo cscope_file
if !empty(cscope_file) && filereadable(cscope_file)
exe "cs add" cscope_file
endif
endif
endif
它工作在第一。但每當我嘗試做:
:cs find c [tag]
搜索結果將出現在QuickFix列表中,但包含結果的文件無法打開。
任何意見,將不勝感激。
Wikia文章:http://vim.wikia.com/wiki/Automatically_create_and_update_cscope_database你 –