diff --git a/runtime/menu.vim b/runtime/menu.vim index 58effde3bb..402768d21c 100644 --- a/runtime/menu.vim +++ b/runtime/menu.vim @@ -17,8 +17,7 @@ if !exists("did_install_default_menus") let did_install_default_menus = 1 -" Localized menus currently not supported in MacVim -if !has("gui_macvim") && (exists("v:lang") || &langmenu != "") +if (exists("v:lang") || &langmenu != "") " Try to find a menu translation file for the current language. if &langmenu != "" if &langmenu =~ "none" @@ -68,7 +67,27 @@ if !has("gui_macvim") && (exists("v:lang") || &langmenu != "") endif +" MacVim Window menu (should be next to Help so give it a high priority) +if has("gui_macvim") + an 9998.300 Window.Minimize + an 9998.301 Window.Minimize\ All + an 9998.310 Window.Zoom + an 9998.311 Window.Zoom\ All + an 9998.320 Window.Toggle\ Full\ Screen\ Mode :set invfullscreen + an 9998.330 Window.-SEP1- + " TODO! Grey out if no tabs are visible. + an 9998.340 Window.Select\ Next\ Tab :tabnext + an 9998.350 Window.Select\ Previous\ Tab :tabprevious + an 9998.360 Window.-SEP2- + an 9998.370 Window.Bring\ All\ To\ Front +endif + " Help menu +if has("gui_macvim") + an 9999.1 &Help.MacVim\ Help :h gui_mac + an 9999.2 Help.MacVim\ Website + an 9999.3 &Help.-sep0- +endif an 9999.10 &Help.&Overview :help an 9999.20 &Help.&User\ Manual :help usr_toc an 9999.30 &Help.&How-to\ links :help how-to @@ -97,16 +116,32 @@ fun! s:Helpfind() endfun " File menu -an 10.310 &File.&Open\.\.\.:e :browse confirm e +if has("gui_macvim") + an 10.290 &File.New\ Window + an 10.295 &File.New\ Tab :tabnew + an 10.310 &File.Open\.\.\. + an 10.325 &File.Open\ Recent + an 10.328 &File.-SEP0- + an 10.330 &File.Close\ Window:qa :conf qa + an 10.332 &File.Close :conf q + an 10.341 &File.Save\ All :browse conf wa + an 10.350 &File.Save\ As\.\.\.:sav :browse confirm saveas +else +endif +if !has("gui_macvim") + an 10.310 &File.&Open\.\.\.:e :browse confirm e +endif an 10.320 &File.Sp&lit-Open\.\.\.:sp :browse sp an 10.320 &File.Open\ Tab\.\.\.:tabnew :browse tabnew -an 10.325 &File.&New:enew :confirm enew -an 10.330 &File.&Close:close +if !has("gui_macvim") + an 10.325 &File.&New:enew :confirm enew + an 10.330 &File.&Close:close \ :if winheight(2) < 0 \ confirm enew \ else \ confirm close \ endif +endif an 10.335 &File.-SEP1- an 10.340 &File.&Save:w :if expand("%") == ""browse confirm welseconfirm wendif an 10.350 &File.Save\ &As\.\.\.:sav :browse confirm saveas @@ -128,9 +163,11 @@ elseif has("unix") vunmenu &File.&Print vnoremenu &File.&Print :w !lpr endif -an 10.600 &File.-SEP4- -an 10.610 &File.Sa&ve-Exit:wqa :confirm wqa -an 10.620 &File.E&xit:qa :confirm qa +if !has("gui_macvim") + an 10.600 &File.-SEP4- + an 10.610 &File.Sa&ve-Exit:wqa :confirm wqa + an 10.620 &File.E&xit:qa :confirm qa +endif func! SelectAll() exe "norm gg" . (&slm == "" ? "VG" : "gH\G") @@ -167,13 +204,20 @@ inoremenu