" Vim support file to define the default menus " You can also use this as a start for your own set of menus. " " Maintainer: Bram Moolenaar " Last Change: 2002 Jul 13 " Note that ":an" (short for ":anoremenu") is often used to make a menu work " in all modes and avoid side effects from mappings defined by the user. " Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise " would not be recognized. See ":help 'cpoptions'". let s:cpo_save = &cpo set cpo&vim " Avoid installing the menus twice if !exists("did_install_default_menus") let did_install_default_menus = 1 if exists("v:lang") || &langmenu != "" " Try to find a menu translation file for the current language. if &langmenu != "" if &langmenu =~ "none" let s:lang = "" else let s:lang = &langmenu endif else let s:lang = v:lang endif " A language name must be at least two characters, don't accept "C" if strlen(s:lang) > 1 " We always use a lowercase name. " Change "iso-8859" to "iso_8859", some systems appear to use this. " Change spaces to underscores. let s:lang = substitute(tolower(s:lang), "\\.iso-", "\\.iso_", "") let s:lang = substitute(s:lang, " ", "_", "g") " Remove "@euro", otherwise "LC_ALL=de_DE@euro gvim" will show English menus let s:lang = substitute(s:lang, "@euro", "", "") menutrans clear exe "runtime! lang/menu_" . s:lang . ".vim" if !exists("did_menu_trans") " There is no exact match, try matching with a wildcard added " (e.g. find menu_de_de.iso_8859-1.vim if s:lang == de_DE). exe "runtime! lang/menu_" . s:lang . "*.vim" if !exists("did_menu_trans") && strlen($LANG) > 1 " On windows locale names are complicated, try using $LANG, it might " have been set by set_init_1(). exe "runtime! lang/menu_" . tolower($LANG) . "*.vim" endif endif endif endif " Help menu 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 an 9999.40 &Help.&Find\.\.\. :call Helpfind() an 9999.45 &Help.-sep1- an 9999.50 &Help.&Credits :help credits an 9999.60 &Help.Co&pying :help copying an 9999.70 &Help.O&rphans :help kcc an 9999.75 &Help.-sep2- an 9999.80 &Help.&Version :version an 9999.90 &Help.&About :intro fun! s:Helpfind() if !exists("g:menutrans_help_dialog") let g:menutrans_help_dialog = "Enter a command or word to find help on:\n\nPrepend i_ for Input mode commands (e.g.: i_CTRL-X)\nPrepend c_ for command-line editing commands (e.g.: c_)\nPrepend ' for an option name (e.g.: 'shiftwidth')" endif let h = inputdialog(g:menutrans_help_dialog) if h != "" let v:errmsg = "" silent! exe "help " . h if v:errmsg != "" echo v:errmsg endif endif endfun " File menu an 10.310 &File.&Open\.\.\.:e :browse confirm e an 10.320 &File.Sp&lit-Open\.\.\.:sp :browse sp an 10.325 &File.&New:enew :confirm enew an 10.330 &File.&Close:close \ :if winheight(2) < 0 \ confirm enew \ else \ confirm close \ 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 if has("diff") an 10.400 &File.-SEP2- an 10.410 &File.Split\ &Diff\ with\.\.\. :browse vert diffsplit an 10.420 &File.Split\ Patched\ &By\.\.\. :browse vert diffpatch endif if has("printer") an 10.500 &File.-SEP3- an 10.510 &File.&Print :hardcopy vunmenu &File.&Print vnoremenu &File.&Print :hardcopy elseif has("unix") an 10.500 &File.-SEP3- an 10.510 &File.&Print :w !lpr 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 " Pasting blockwise and linewise selections is not possible in Insert and " Visual mode without the +virtualedit feature. They are pasted as if they " were characterwise instead. Add to that some tricks to leave the cursor in " the right position, also for "gi". if has("virtualedit") nnoremap