:unmenu! * " remove all menus in Insert and Command-line mode
:aunmenu * " remove all menus in all modes, except for Terminal
" mode
:tlunmenu * " remove all menus in Terminal mode
If you want to get rid of the menu bar: >
:set guioptions-=m
Disabling Menus *disable-menus*
*:menu-disable* *:menu-enable*
If you do not want to remove a menu, but disable it for a moment, this can be
done by adding the "enable" or "disable" keyword to a ":menu" command.
Examples: >
:menu disable &File.&Open\.\.\.
:amenu enable *
:amenu disable &Tools.*
The command applies to the modes as used with all menu commands. Note that
characters like "&" need to be included for translated names to be found.
When the argument is "*", all menus are affected. Otherwise the given menu
name and all existing submenus below it are affected.
Examples for Menus *menu-examples*
Here is an example on how to add menu items with menus! You can add a menu
item for the keyword under the cursor. The register "z" is used. >
:nmenu Words.Add\ Var wb"zye:menu! Words.<C-R>z <C-R>z<CR>
:nmenu Words.Remove\ Var wb"zye:unmenu! Words.<C-R>z<CR>
:vmenu Words.Add\ Var "zy:menu! Words.<C-R>z <C-R>z <CR>
:vmenu Words.Remove\ Var "zy:unmenu! Words.<C-R>z<CR>
:imenu Words.Add\ Var <Esc>wb"zye:menu! Words.<C-R>z <C-R>z<CR>a
:imenu Words.Remove\ Var <Esc>wb"zye:unmenu! Words.<C-R>z<CR>a
(the rhs is in <> notation, you can copy/paste this text to try out the
mappings, or put these lines in your gvimrc; "<C-R>" is CTRL-R, "<CR>" is
the <CR> key. |<>|)
*tooltips* *menu-tips*
Tooltips & Menu tips
See section |42.4| in the user manual.
*:tmenu*
:tm[enu] {menupath} {rhs} Define a tip for a menu or tool. (only in
X11 and Win32 GUI)
:tm[enu] [menupath] List menu tips. (only in X11 and Win32 GUI)
*:tunmenu*
:tu[nmenu] {menupath} Remove a tip for a menu or tool.