Run a menu by name
Example
Normal 0 / 2Command-line 1 / 2Normal 2 / 2Run a menu by name.
GUI menu bar
- Entry
Example.Number- Normal action
:set number<CR>
Window options
- number
off
Command entered · ready to apply
GUI menu bar
- Entry
Example.Number- Normal action
:set number<CR>
Window options
- number
off
Command line
- Typed text
:emenu Example.Number- Insertion offset
21
:emenu executes the prepared Normal-mode menu action and enables line numbers.
GUI menu bar
- Entry
Example.Number- Normal action
:set number<CR>
Window options
- number
on
Before & after
Before
GUI menu bar
- Entry
Example.Number- Normal action
:set number<CR>
Window options
- number
off
After
GUI menu bar
- Entry
Example.Number- Normal action
:set number<CR>
Window options
- number
on
Documentation-backed illustration. GUI Vim with +menu and guioptions containing m; nnoremenu <special> Example.Number :set number<CR> is prepared. :emenu executes the prepared Normal-mode menu action and enables line numbers. Primary help: :emenu.
alpha
beta
gammaCursor on line 1, column 1Details & Vim help
Run a menu by name. 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 :em[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.