wie man cscope.out in vim automatisch lädt
Ich möchte meine automatisch ladencscope.out
im Unterverzeichnis meines Projekts, so füge ich diese Skripte in meinem.vimrc
, was wie folgt ist:
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
es funktioniert zuerst. Aber jedes Mal, wenn ich versuche zu tun:
:cs find c [tag]
Das Suchergebnis wird in der QuickFix-Liste angezeigt, die Datei mit dem Ergebnis kann jedoch nicht geöffnet werden.
Jeder Rat wäre dankbar.