2015-07-09 13:38:53 +02:00
|
|
|
" Enjoy the right click button!
|
2013-03-01 17:28:56 +01:00
|
|
|
" Custom right click menu to call cscope functions
|
|
|
|
"
|
|
|
|
|
2015-09-04 14:36:22 +02:00
|
|
|
if exists("g:loaded_menu")
|
2013-03-01 17:28:56 +01:00
|
|
|
finish
|
|
|
|
endif
|
2015-09-04 14:36:22 +02:00
|
|
|
let g:loaded_menu = 1
|
2013-03-01 17:28:56 +01:00
|
|
|
set mousemodel=popup
|
|
|
|
|
|
|
|
|
|
|
|
function! PopulateMenu()
|
2015-07-09 13:38:53 +02:00
|
|
|
exe "amenu PopUp.-Sep- :"
|
|
|
|
exe "amenu PopUp.Help\\ !<Tab><F1> :call Help()<CR>"
|
|
|
|
exe "amenu PopUp.-Sep1- :"
|
|
|
|
exe "amenu PopUp.Find\\ File<Tab><F4> :cscope find f <C-R>=expand('<cfile>')<CR><CR>"
|
|
|
|
exe "amenu PopUp.Find\\ Symbol<Tab><F5> :cscope find s <C-R>=expand('<cword>')<CR><CR>"
|
|
|
|
exe "amenu PopUp.Find\\ Definition<Tab><F6> :cscope find g <C-R>=expand('<cword>')<CR><CR>"
|
|
|
|
exe "amenu PopUp.Find\\ Call<Tab><F7> :cscope find c <C-R>=expand('<cword>')<CR><CR>"
|
|
|
|
exe "amenu PopUp.Find\\ Text<Tab> :cscope find t <C-R>=expand('<cword>')<CR><CR>"
|
|
|
|
exe "amenu PopUp.Find\\ Egrep<Tab> :cscope find e <C-R>=expand('<cword>')<CR><CR>"
|
|
|
|
exe "amenu PopUp.Go\\ Back<Tab><Ctl-t> <C-t>"
|
|
|
|
exe "amenu PopUp.-Sep2- :"
|
|
|
|
exe "amenu PopUp.Create\\ local\\ code\\ reference<Tab><M-F8> :CtagsKernelBuild<CR><CR>:CscopeKernelBuild<CR><CR>:cscope reset<CR><CR>:cscope add cscope.out<CR><CR>"
|
|
|
|
exe "amenu PopUp.Create\\ local\\ code\\ reference\\ with\\ system\\ headers<Tab><S-F8> :CtagsBuild<CR><CR>:CscopeBuild<CR><CR>:cscope reset<CR><CR>:cscope add cscope.out<CR><CR>"
|
|
|
|
exe "amenu PopUp.Create\\ global\\ code\\ reference<Tab><F3> :call AutotagsUpdate()<CR>"
|
|
|
|
exe "amenu PopUp.Create\\ global\\ code\\ reference\\ for\\ path<Tab><Shift-F3> :call AutotagsAdd()<CR>"
|
|
|
|
exe "amenu PopUp.-Sep3- :"
|
|
|
|
exe "amenu PopUp.Toggle\\ show\\ function<Tab><F8> :TlistToggle<CR>"
|
2013-03-01 17:28:56 +01:00
|
|
|
endfunc
|
|
|
|
|
|
|
|
|
|
|
|
if has("vim_starting")
|
|
|
|
augroup LoadBufferPopup
|
|
|
|
au! VimEnter * call PopulateMenu()
|
|
|
|
au VimEnter * au! LoadBufferPopup
|
|
|
|
augroup END
|
|
|
|
else
|
|
|
|
call PopulateMenu()
|
|
|
|
endif
|