diff runtime/doc/gui.txt @ 14952:405309f9dd13 v8.1.0487

patch 8.1.0487: no menus specifically for the terminal window commit https://github.com/vim/vim/commit/4c5d815256099b50eca2ec5bf8f9aaa67a890211 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Oct 19 22:36:53 2018 +0200 patch 8.1.0487: no menus specifically for the terminal window Problem: No menus specifically for the terminal window. Solution: Add :tlmenu. (Yee Cheng Chin, closes https://github.com/vim/vim/issues/3439) Add a menu test.
author Bram Moolenaar <Bram@vim.org>
date Fri, 19 Oct 2018 22:45:07 +0200
parents 2f7e67dd088c
children f8b0f1e42f2c
line wrap: on
line diff
--- a/runtime/doc/gui.txt
+++ b/runtime/doc/gui.txt
@@ -547,15 +547,16 @@ floating menus that do not appear on the
 
 5.2 Creating New Menus					*creating-menus*
 
-				*:me*  *:menu*  *:noreme*  *:noremenu*
-				*:am*  *:amenu* *:an*      *:anoremenu*
-				*:nme* *:nmenu* *:nnoreme* *:nnoremenu*
-				*:ome* *:omenu* *:onoreme* *:onoremenu*
-				*:vme* *:vmenu* *:vnoreme* *:vnoremenu*
-				*:xme* *:xmenu* *:xnoreme* *:xnoremenu*
-				*:sme* *:smenu* *:snoreme* *:snoremenu*
-				*:ime* *:imenu* *:inoreme* *:inoremenu*
-				*:cme* *:cmenu* *:cnoreme* *:cnoremenu*
+				*:me*  *:menu*   *:noreme*  *:noremenu*
+				*:am*  *:amenu*  *:an*      *:anoremenu*
+				*:nme* *:nmenu*  *:nnoreme* *:nnoremenu*
+				*:ome* *:omenu*  *:onoreme* *:onoremenu*
+				*:vme* *:vmenu*  *:vnoreme* *:vnoremenu*
+				*:xme* *:xmenu*  *:xnoreme* *:xnoremenu*
+				*:sme* *:smenu*  *:snoreme* *:snoremenu*
+				*:ime* *:imenu*  *:inoreme* *:inoremenu*
+				*:cme* *:cmenu*  *:cnoreme* *:cnoremenu*
+				*:tlm* *:tlmenu* *:tln*     *:tlnoremenu*
 				*E330* *E327* *E331* *E336* *E333*
 				*E328* *E329* *E337* *E792*
 To 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 u
 "Big Changes", which is a sub-menu containing the item "Delete All Spaces",
 which when selected, performs the operation.
 
+To create a menu for terminal mode, use |:tlmenu| instead of |:tmenu| unlike
+key mapping (|:tmap|). This is because |:tmenu| is already used for defining
+tooltips for menus. See |terminal-typing|.
+
 Special characters in a menu name:
 
 	&	The next character is the shortcut key.  Make sure each
@@ -589,9 +594,9 @@ With the shortcut "F" (while keeping the
 this menu can be used.  The second part is shown as "Open     :e".  The ":e"
 is right aligned, and the "O" is underlined, to indicate it is the shortcut.
 
-The ":amenu" command can be used to define menu entries for all modes at once.
-To make the command work correctly, a character is automatically inserted for
-some modes:
+The ":amenu" command can be used to define menu entries for all modes at once,
+except for Terminal mode.  To make the command work correctly, a character is
+automatically inserted for some modes:
 	mode		inserted	appended	~
 	Normal		nothing		nothing
 	Visual		<C-C>		<C-\><C-G>
@@ -865,6 +870,16 @@ 5.4 Executing Menus					*execute-menus*
 				insert-mode menu Eg: >
 	:emenu File.Exit
 
+:[range]em[enu] {mode} {menu}	Like above, but execute the menu for {mode}:
+				    'n': |:nmenu|  Normal mode
+				    'v': |:vmenu|  Visual mode
+				    's': |:smenu|  Select mode
+				    'o': |:omenu|  Operator-pending mode
+				    't': |:tlmenu| Terminal mode
+				    'i': |:imenu|  Insert mode
+				    'c': |:cmenu|  Cmdline mode
+				
+
 If the console-mode vim has been compiled with WANT_MENU defined, you can
 use :emenu to access useful menu items you may have got used to from GUI
 mode.  See 'wildmenu' for an option that works well with this.  See
@@ -885,6 +900,7 @@ 5.5 Deleting Menus					*delete-menus*
 						*:sunme* *:sunmenu*
 						*:iunme* *:iunmenu*
 						*:cunme* *:cunmenu*
+						*:tlu*   *:tlunmenu*
 To delete a menu item or a whole submenu, use the unmenu commands, which are
 analogous to the unmap commands.  Eg: >
     :unmenu! Edit.Paste
@@ -951,6 +967,8 @@ See section |42.4| in the user manual.
 :tu[nmenu] {menupath}		Remove a tip for a menu or tool.
 				{only in X11 and Win32 GUI}
 
+Note: To create menus for terminal mode, use |:tlmenu| instead.
+
 When a tip is defined for a menu item, it appears in the command-line area
 when the mouse is over that item, much like a standard Windows menu hint in
 the status bar.  (Except when Vim is in Command-line mode, when of course