From f2e01d7e513067ddb57c75f6e38cdcf434946cf8 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Mon, 22 Oct 2018 00:02:58 +0200 Subject: Major refactoring for version 2.0 vim-plug has been removed and replaced with Vims internal bundle mechanism. But I already noticed, that there is also GLVM now and started trying that as well. --- plugin/cscope.vim | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 plugin/cscope.vim (limited to 'plugin/cscope.vim') diff --git a/plugin/cscope.vim b/plugin/cscope.vim new file mode 100644 index 0000000..b9ca444 --- /dev/null +++ b/plugin/cscope.vim @@ -0,0 +1,57 @@ +"======================================================================================================================= +" CSCOPE: http://vim.wikia.com/wiki/Cscope +"======================================================================================================================= + +augroup MAX_CSCOPE + if has('cscope') " compiled with cscope support? + set cscopetag " CTRL-] uses cscope first, then ctags + set cscopeverbose + + if has('quickfix') + set cscopequickfix=s+,c+,d+,i+,t+,e+ + endif + + if has('menu') + 1001menu &Cscope.find.c\ symbol + \s + \ :cscope find s <:cR> + 1001menu &Cscope.find.definition + \g + \ :cscope find g <:cR> + 1001menu &Cscope.find.functions\ called\ by\ this + \d + \ :cscope find d <:cR> + 1001menu &Cscope.find.functions\ calling\ this + \c + \ :cscope find c <:cR> + 1001menu &Cscope.find.text\ string + \t + \ :cscope find t <:cR> + 1001menu &Cscope.find.egrep\ pattern + \e + \ :cscope find e <:cR> + 1001menu &Cscope.find.this\ file + \f + \ :cscope find f <:cR> + 1001menu &Cscope.find.files\ including\ this\ file + \i + \ :cscope find i <:cR> + 1001menu &Cscope.find.places\ where\ this\ symbol\ is\ assigned\ a\ value + \a + \ :cscope find a <:cR> + 1001menu &Cscope.-Sep1- + \ : + 1001menu &Cscope.create\ and\ add\ database + \ :cscope kill -1:execute '!find -type f -regex ".*\.\(c\\|h\\|cpp\\|cxx\\|hh\\|hpp\\|hxx\)$" cscope -i- -b -q -v':cscope add . + 1001menu &Cscope.-Sep2- + \ : + 1001menu &Cscope.add\ \. + \ :cscope add . + 1001menu &Cscope.show + \ :cscope show + 1001menu &Cscope.reset + \ :cscope reset + endif + endif +augroup END " MAX_CSCOPE + -- cgit v1.2.3