diff options
Diffstat (limited to 'plugin/cscope.vim')
| -rw-r--r-- | plugin/cscope.vim | 57 |
1 files changed, 57 insertions, 0 deletions
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 @@ | |||
| 1 | "======================================================================================================================= | ||
| 2 | " CSCOPE: http://vim.wikia.com/wiki/Cscope | ||
| 3 | "======================================================================================================================= | ||
| 4 | |||
| 5 | augroup MAX_CSCOPE | ||
| 6 | if has('cscope') " compiled with cscope support? | ||
| 7 | set cscopetag " CTRL-] uses cscope first, then ctags | ||
| 8 | set cscopeverbose | ||
| 9 | |||
| 10 | if has('quickfix') | ||
| 11 | set cscopequickfix=s+,c+,d+,i+,t+,e+ | ||
| 12 | endif | ||
| 13 | |||
| 14 | if has('menu') | ||
| 15 | 1001menu &Cscope.find.c\ symbol | ||
| 16 | \<tab>s | ||
| 17 | \ :cscope find s <cword><:cR> | ||
| 18 | 1001menu &Cscope.find.definition | ||
| 19 | \<tab>g | ||
| 20 | \ :cscope find g <cword><:cR> | ||
| 21 | 1001menu &Cscope.find.functions\ called\ by\ this | ||
| 22 | \<tab>d | ||
| 23 | \ :cscope find d <cword><:cR> | ||
| 24 | 1001menu &Cscope.find.functions\ calling\ this | ||
| 25 | \<tab>c | ||
| 26 | \ :cscope find c <cword><:cR> | ||
| 27 | 1001menu &Cscope.find.text\ string | ||
| 28 | \<tab>t | ||
| 29 | \ :cscope find t <cword><:cR> | ||
| 30 | 1001menu &Cscope.find.egrep\ pattern | ||
| 31 | \<tab>e | ||
| 32 | \ :cscope find e <cword><:cR> | ||
| 33 | 1001menu &Cscope.find.this\ file | ||
| 34 | \<tab>f | ||
| 35 | \ :cscope find f <cword><:cR> | ||
| 36 | 1001menu &Cscope.find.files\ including\ this\ file | ||
| 37 | \<tab>i | ||
| 38 | \ :cscope find i <cword><:cR> | ||
| 39 | 1001menu &Cscope.find.places\ where\ this\ symbol\ is\ assigned\ a\ value | ||
| 40 | \<tab>a | ||
| 41 | \ :cscope find a <cword><:cR> | ||
| 42 | 1001menu &Cscope.-Sep1- | ||
| 43 | \ : | ||
| 44 | 1001menu &Cscope.create\ and\ add\ database | ||
| 45 | \ :cscope kill -1<CR>:execute '!find -type f -regex ".*\.\(c\\|h\\|cpp\\|cxx\\|hh\\|hpp\\|hxx\)$" <bar> cscope -i- -b -q -v'<CR>:cscope add .<CR> | ||
| 46 | 1001menu &Cscope.-Sep2- | ||
| 47 | \ : | ||
| 48 | 1001menu &Cscope.add\ \. | ||
| 49 | \ :cscope add .<CR> | ||
| 50 | 1001menu &Cscope.show | ||
| 51 | \ :cscope show<CR> | ||
| 52 | 1001menu &Cscope.reset | ||
| 53 | \ :cscope reset<CR> | ||
| 54 | endif | ||
| 55 | endif | ||
| 56 | augroup END " MAX_CSCOPE | ||
| 57 | |||
