" Add_Cscope_Menu " Adds a cscope menu " All the commands work on the word that is under the cursor function! s:Add_CScope_Menu(menu_clear) if has("gui_running") if (a:menu_clear) silent! unmenu &Cscope silent! unmenu! &Cscope amenu &Cscope.Find\ functions\ calling\ this\ function :cs find c =expand("") amenu &Cscope.Find\ functions\ called\ by\ this\ function :cs find d =expand("") amenu &Cscope.Find\ this\ egrep\ pattern :cs find e =expand("") amenu &Cscope.Find\ this\ file :cs find f =expand("") amenu &Cscope.Find\ this\ definition :cs find g =expand("") amenu &Cscope.Find\ files\ #including\ this\ file :cs find i =expand("") amenu &Cscope.Find\ this\ Symbol :cs find s =expand("") amenu &Cscope.Find\ assignments\ to :cs find t =expand("") endif endif endfunction autocmd BufEnter * call s:Add_CScope_Menu(1)