Enter new menu item for all modes
Example
Normal 0 / 2Command-line 1 / 2Normal 2 / 2Enter new menu item for all modes.
GUI menu bar
- Example menu
absent
Command entered · ready to apply
GUI menu bar
- Example menu
absent
Command line
- Typed text
:amenu Example.Number :set number<CR>- Insertion offset
37
The Example menu gains this concrete entry. Its action is registered for the displayed modes; defining it does not invoke it.
GUI menu bar
- Visible entry
Example.Number- Applies in
Normal, Visual, Select, Operator-pending, Insert, Command-line- Action
:set number<CR>- Remapping
enabled
Before & after
Before
GUI menu bar
- Example menu
absent
After
GUI menu bar
- Visible entry
Example.Number- Applies in
Normal, Visual, Select, Operator-pending, Insert, Command-line- Action
:set number<CR>- Remapping
enabled
Documentation-backed illustration. a running GUI Vim with +menu; guioptions contains m and cpoptions excludes <; :amenu mode and remapping semantics from gui.txt. The Example menu gains this concrete entry. Its action is registered for the displayed modes; defining it does not invoke it. Primary help: :amenu.
alpha
beta
gammaCursor on line 1, column 1Details & Vim help
Enter new menu item for all modes. This Ex reference uses the full command name; the alphabetical index omits arguments. Supply the ranges, arguments, flags and prerequisite state documented in the linked help. Press Enter to submit a complete command. The index spelling :am[enu] puts the optional abbreviation suffix in square brackets; those brackets are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.