From 5d6b94b9c8525ea090df1a4eb449d15bbb82e779 Mon Sep 17 00:00:00 2001 From: Colin Patrick McCabe Date: Mon, 15 Feb 2010 13:58:55 -0800 Subject: [PATCH] vim: Add cscope keyboard shortcuts --- .vim/plugin/cscope_settings.vim | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) create mode 100644 .vim/plugin/cscope_settings.vim 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 -- 1.6.6.rc1.39.g9a42