" These menu commands create the default Vim menus. " You can use this as a start for your own set of menus. " Make sure the '<' flag is not included in 'cpoptions', otherwise would " not be recognized. See ":help 'cpoptions'". let cpo_save = &cpo let &cpo = "" " Help menu " Note that "amenu" is used to make it work in all modes 9999amenu Help.Overview\ \ :help 9999amenu Help.How\ to\.\.\. :help how-to 9999amenu Help.GUI :help gui 9999amenu Help.Version :version 9999amenu Help.Credits :help credits 9999amenu Help.Copying :help uganda " File menu if has("win32") 10amenu File.Open\ :e :e 10amenu File.Split-Open\ :sp :sp 10amenu File.Save\ :w :w 10amenu File.Close\ :q :q " Use Notepad for printing. 10amenu File.Print :let ttt=tempname()exec ":w! ".tttexec "!start notepad /p ".tttexec "!del ".ttt 10vmenu File.Print :let ttt=tempname()exec ":'<,'>w! ".tttexec "!start notepad /p ".tttexec "!del ".ttt 10amenu File.Save-Exit\ :wqa :wqa 10amenu File.Exit\ :qa :qa 10amenu File.Exit\ NO\ Save\ :qa! :qa! else 10amenu File.Open\ \ \ \ \ \ \ \ \ :e :e 10amenu File.Split-Open\ \ \ :sp :sp 10amenu File.Save\ \ \ \ \ \ \ \ \ :w :w 10amenu File.Close\ \ \ \ \ \ \ \ :q :q if has("unix") 10amenu File.Print :w !lpr 10vmenu File.Print :w !lpr endif 10amenu File.Save-Exit\ \ \ \ :wqa :wqa 10amenu File.Exit\ \ \ \ \ \ \ \ \ :qa :qa 10amenu File.Exit\ NO\ Save\ :qa! :qa! endif " Edit menu 20amenu Edit.Undo u 20amenu Edit.Redo 20vmenu Edit.Cut x 20vmenu Edit.Copy y 20nmenu Edit.Put\ Before [p 20imenu Edit.Put\ Before [p 20nmenu Edit.Put\ After ]p 20imenu Edit.Put\ After ]p 20nmenu Edit.Paste i* 20vmenu Edit.Paste ""xi* 20menu! Edit.Paste * 20amenu Edit.Search / 20amenu Edit.Search\ and\ Replace :%s/ 20vmenu Edit.Search\ and\ Replace :s/ " Window menu 30amenu Window.New n 30amenu Window.Split s 30amenu Window.Split\ To\ # 30amenu Window.Close c 30amenu Window.Close\ Other(s) o 30amenu Window.Next w 30amenu Window.Previous W 30amenu Window.Equal\ Height = 30amenu Window.Rotate\ Up R 30amenu Window.Rotate\ Down r if has("gui_win32") 30amenu Window.Select\ Font :set guifont=* endif " Programming menu 40amenu IDE.Make :make 40amenu IDE.List\ Errors :cl 40amenu IDE.List\ Messages :cl! 40amenu IDE.Next\ Error :cn 40amenu IDE.Previous\ Error :cp " Restore the previous value of 'cpoptions'. let &cpo = cpo_save unlet cpo_save