if has("cscope") set cscopetag set csto=0 if $CSCOPE_DB != "" cs add $CSCOPE_DB else let dirs = split($PWD, '/') let paths = ['/'] for d in dirs let paths = add(paths, paths[len(paths) - 1] . d . '/') endfor for d in reverse(paths) let cscope_file = d . "/cscope.out" if filereadable(cscope_file) execute('cs add ' . cscope_file) break endif endfor endif set cscopeverbose nmap s :cs find s =expand("") nmap g :cs find g =expand("") nmap c :cs find c =expand("") nmap t :cs find t =expand("") nmap e :cs find e =expand("") nmap f :cs find f =expand("") nmap i :cs find i ^=expand("")$ nmap d :cs find d =expand("") nmap S :cs find t struct =expand("") { nmap s :vert scs find s =expand("") nmap g :vert scs find g =expand("") nmap c :vert scs find c =expand("") nmap t :vert scs find t =expand("") nmap e :vert scs find e =expand("") nmap f :vert scs find f =expand("") nmap i :vert scs find i ^=expand("")$ nmap d :vert scs find d =expand("") nmap S :vert scs find t struct =expand("") { nmap s :scs find s =expand("") nmap g :scs find g =expand("") nmap c :scs find c =expand("") nmap t :scs find t =expand("") nmap e :scs find e =expand("") nmap f :scs find f =expand("") nmap i :scs find i ^=expand("")$ nmap d :scs find d =expand("") nmap S :scs find t struct =expand("") { endif