From: Colin Patrick McCabe Date: Mon, 15 Feb 2010 21:58:55 +0000 (-0800) Subject: vim: Add cscope keyboard shortcuts X-Git-Url: http://club.cc.cmu.edu/~cmccabe/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d6b94b9c8525ea090df1a4eb449d15bbb82e779;hp=f3df0006f5cfa5a311cf48eb56a66d8619f1bc35;p=cmccabe-etc vim: Add cscope keyboard shortcuts --- diff --git a/.vim/plugin/cscope_settings.vim b/.vim/plugin/cscope_settings.vim new file mode 100644 index 0000000..86732b9 --- /dev/null +++ b/.vim/plugin/cscope_settings.vim @@ -0,0 +1,24 @@ +" Make sure that vim was compiled with the '--enable-cscope' option +if has("cscope") + set cscopetag + + " check cscope for definition of a symbol before checking ctags + set csto=0 + + " add any cscope database in current directory + if filereadable("cscope.out") + cs add cscope.out + endif + + " show msg when any other cscope db added + 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("") +endif