@@ -547,15 +547,16 @@ floating menus that do not appear on the main menu bar.
547547
5485485.2 Creating New Menus *creating-menus*
549549
550- *:me* *:menu* *:noreme* *:noremenu*
551- *:am* *:amenu* *:an* *:anoremenu*
552- *:nme* *:nmenu* *:nnoreme* *:nnoremenu*
553- *:ome* *:omenu* *:onoreme* *:onoremenu*
554- *:vme* *:vmenu* *:vnoreme* *:vnoremenu*
555- *:xme* *:xmenu* *:xnoreme* *:xnoremenu*
556- *:sme* *:smenu* *:snoreme* *:snoremenu*
557- *:ime* *:imenu* *:inoreme* *:inoremenu*
558- *:cme* *:cmenu* *:cnoreme* *:cnoremenu*
550+ *:me* *:menu* *:noreme* *:noremenu*
551+ *:am* *:amenu* *:an* *:anoremenu*
552+ *:nme* *:nmenu* *:nnoreme* *:nnoremenu*
553+ *:ome* *:omenu* *:onoreme* *:onoremenu*
554+ *:vme* *:vmenu* *:vnoreme* *:vnoremenu*
555+ *:xme* *:xmenu* *:xnoreme* *:xnoremenu*
556+ *:sme* *:smenu* *:snoreme* *:snoremenu*
557+ *:ime* *:imenu* *:inoreme* *:inoremenu*
558+ *:cme* *:cmenu* *:cnoreme* *:cnoremenu*
559+ *:tlm* *:tlmenu* *:tln* *:tlnoremenu*
559560 *E330* *E327* *E331* *E336* *E333*
560561 *E328* *E329* *E337* *E792*
561562To create a new menu item, use the ":menu" commands. They are mostly like
@@ -571,6 +572,10 @@ the mouse button down on this will pop up a menu containing the item
571572"Big Changes", which is a sub-menu containing the item "Delete All Spaces",
572573which when selected, performs the operation.
573574
575+ To create a menu for terminal mode, use | :tlmenu | instead of | :tmenu | unlike
576+ key mapping (| :tmap | ). This is because | :tmenu | is already used for defining
577+ tooltips for menus. See | terminal-typing | .
578+
574579Special characters in a menu name:
575580
576581 & The next character is the shortcut key. Make sure each
@@ -589,9 +594,9 @@ With the shortcut "F" (while keeping the <Alt> key pressed), and then "O",
589594this menu can be used. The second part is shown as "Open :e". The ":e"
590595is right aligned, and the "O" is underlined, to indicate it is the shortcut.
591596
592- The ":amenu" command can be used to define menu entries for all modes at once.
593- To make the command work correctly, a character is automatically inserted for
594- some modes:
597+ The ":amenu" command can be used to define menu entries for all modes at once,
598+ except for Terminal mode. To make the command work correctly, a character is
599+ automatically inserted for some modes:
595600 mode inserted appended ~
596601 Normal nothing nothing
597602 Visual <C-C> <C-\><C-G>
@@ -865,6 +870,16 @@ be used to complete the name of the menu item.
865870 insert-mode menu Eg: >
866871 :emenu File.Exit
867872
873+ :[range] em[enu] {mode} {menu} Like above, but execute the menu for {mode} :
874+ 'n': | :nmenu | Normal mode
875+ 'v': | :vmenu | Visual mode
876+ 's': | :smenu | Select mode
877+ 'o': | :omenu | Operator-pending mode
878+ 't': | :tlmenu | Terminal mode
879+ 'i': | :imenu | Insert mode
880+ 'c': | :cmenu | Cmdline mode
881+
882+
868883If the console-mode vim has been compiled with WANT_MENU defined, you can
869884use :emenu to access useful menu items you may have got used to from GUI
870885mode. See 'wildmenu' for an option that works well with this. See
@@ -885,6 +900,7 @@ using the last visual selection.
885900 *:sunme* *:sunmenu*
886901 *:iunme* *:iunmenu*
887902 *:cunme* *:cunmenu*
903+ *:tlu* *:tlunmenu*
888904To delete a menu item or a whole submenu, use the unmenu commands, which are
889905analogous to the unmap commands. Eg: >
890906 :unmenu! Edit.Paste
@@ -951,6 +967,8 @@ See section |42.4| in the user manual.
951967:tu[nmenu] {menupath} Remove a tip for a menu or tool.
952968 {only in X11 and Win32 GUI}
953969
970+ Note: To create menus for terminal mode, use | :tlmenu | instead.
971+
954972When a tip is defined for a menu item, it appears in the command-line area
955973when the mouse is over that item, much like a standard Windows menu hint in
956974the status bar. (Except when Vim is in Command-line mode, when of course
0 commit comments