Vim Recall繁體中文

End Insert mode

:stopinsert

Example

Normal 0 / 4

End Insert mode.

Editing mode

Mode
Normal
Cursor
on c
Before & after

Before

Editing mode

Mode
Normal
Cursor
on c

After

Editing mode

Mode
Normal
Cursor
on c

Subject: :stopinsert. Documentation-backed illustration; assumes clean English 80-column by 24-line Vim, cmdheight=4, modifiable cat buffer at offset 0, insertmode off and no mappings, autocommands or queued input. Separately checked on pinned Vim 9.2.1341; excluded from the full runtime replay corpus. Enter Insert mode, use Ctrl-o for one Normal command, then submit :stopinsert to remain in Normal mode without editing text.

Sample buffer
cat
Cursor on line 1, column 1
Details & Vim help

End Insert 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 :stopi[nsert] 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. From Insert mode, Ctrl-o permits one Normal command: enter :stopinsert and press Enter to remain in Normal mode. In pinned Vim 9.2.1341, a stop request made by an InsertEnter autocommand is overwritten during Insert initialization; use the manual sequence shown here.