To: vim_dev@googlegroups.com Subject: Patch 8.0.1279 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1279 Problem: Initializing menus can be slow, especially when there are many keymaps, color schemes, etc. Solution: Do the globbing for runtime files lazlily. (Ken Takata) Files: runtime/doc/gui.txt, runtime/menu.vim *** ../vim-8.0.1278/runtime/doc/gui.txt 2017-09-23 16:33:40.853195258 +0200 --- runtime/doc/gui.txt 2017-11-09 18:51:16.027886877 +0100 *************** *** 497,503 **** filetypes already present at startup, add: > :let do_syntax_sel_menu = 1 ! < *console-menus* Although this documentation is in the GUI section, you can actually use menus in console mode too. You will have to load |menu.vim| explicitly then, it is --- 499,520 ---- filetypes already present at startup, add: > :let do_syntax_sel_menu = 1 ! The following menuitems show all available color schemes, keymaps and compiler ! settings: ! Edit > Color Scheme ~ ! Edit > Keymap ~ ! Tools > Set Compiler ~ ! However, they can also take a bit of time to load, because they search all ! related files from the directories in 'runtimepath'. Therefore they are ! loaded lazily (by the |CursorHold| event), or you can also load them manually. ! If you want to have all these items already present at startup, add: > ! :let do_no_lazyload_menus = 1 ! ! Note that the menu.vim is sourced when `:syntax on` or `:filetype on` is ! executed or after your .vimrc file is sourced. This means that the 'encoding' ! option and the language of messages (`:language messages`) must be set before ! that (if you want to change them). ! *console-menus* Although this documentation is in the GUI section, you can actually use menus in console mode too. You will have to load |menu.vim| explicitly then, it is *** ../vim-8.0.1278/runtime/menu.vim 2016-07-27 20:57:47.000000000 +0200 --- runtime/menu.vim 2017-11-09 19:02:29.369491201 +0100 *************** *** 2,8 **** " You can also use this as a start for your own set of menus. " " Maintainer: Bram Moolenaar ! " Last Change: 2016 Jul 27 " 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. --- 2,8 ---- " You can also use this as a start for your own set of menus. " " Maintainer: Bram Moolenaar ! " Last Change: 2017 Nov 09 " 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. *************** *** 70,76 **** " 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 --- 70,76 ---- " 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 *************** *** 112,118 **** 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 --- 112,118 ---- 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 *************** *** 159,165 **** inoremenu &Edit.Put\ &Before[p [p nnoremenu 20.380 &Edit.Put\ &After]p ]p inoremenu &Edit.Put\ &After]p ]p ! if has("win32") || has("win16") vnoremenu 20.390 &Edit.&Deletex x endif noremenu