From c3779261fadc809c2785401dc42009c5d55cebba Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Thu, 10 Mar 2022 09:18:57 +0100 Subject: vim: improve cscope --- .vimrc | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 8faef1d..1bc2263 100644 --- a/.vimrc +++ b/.vimrc @@ -91,11 +91,23 @@ noremap :Files " 'i' includes: find files that include the filename under cursor " 'd' called: find functions that function under cursor calls -noremap s :cs find s =expand("") -noremap g :cs find g =expand("") -noremap c :cs find c =expand("") -noremap t :cs find t =expand("") -noremap e :cs find e =expand("") -noremap i :cs find i =expand("") -noremap f :cs find f =expand("") -noremap d :cs find d =expand("") +if has("cscope") + set csto=0 + set cst + set nocsverb + if filereadable("cscope.out") + cs add cscope.out + elseif $CSCOPE_DB + cs add $CSCOPE_DB + endif + set csverb +endif + +nmap cs :cs find s =expand("") +nmap cg :cs find g =expand("") +nmap cc :cs find c =expand("") +nmap ct :cs find t =expand("") +nmap ce :cs find e =expand("") +nmap ci :cs find i =expand("") +nmap cf :cs find f =expand("") +nmap cd :cs find d =expand("") -- cgit v1.2.3