分类: LINUX
2013-04-23 20:34:35
原文地址:VIM 自动添加cscope.out 数据库 作者:henryking89
if has("cscope") set csprg=/usr/bin/cscope set csto=0 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",".;") let cscope_pre=matchstr(cscope_file,".*/") if !empty(cscope_file) && filereadable(cscope_file) exe "cs add" cscope_file cscope_pre endif endif endif