Vim Recall繁體中文

Enter new menu item for all modes

:amenu

Example

Normal 0 / 2

Enter new menu item for all modes.

GUI menu bar

Example menu
absent
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.

Sample buffer
alpha
beta
gamma
Cursor on line 1, column 1
Details & 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.