Add menu for Command-line mode
Example
Normal 0 / 2Command-line 1 / 2Normal 2 / 2Add menu for Command-line mode.
GUI menu bar
- Example menu
absent
Command entered · ready to apply
GUI menu bar
- Example menu
absent
Command line
- Typed text
:cmenu Example.Hello hello- Insertion offset
26
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.Hello- Applies in
Command-line- Action
hello- Remapping
enabled
Before & after
Before
GUI menu bar
- Example menu
absent
After
GUI menu bar
- Visible entry
Example.Hello- Applies in
Command-line- Action
hello- Remapping
enabled
Documentation-backed illustration. a running GUI Vim with +menu; guioptions contains m and g; :cmenu 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: :cmenu.
alpha
beta
gammaCursor on line 1, column 1Details & Vim help
Add menu for Command-line mode. 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 :cme[nu] 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.