Vim Recall繁體中文

Make one Normal-mode detour

<C-o>0

Example

Insert mode after world in Hello world.

Before
Text: Hello world Insertion point: after world · Insert mode

  1. <C-o> One Normal command available
  2. 0 Before H · back in Insert mode

After
Text: Hello world Insertion point: before H · Insert mode

Details & Vim help

Run one Normal-mode command, then return to Insert mode.

Move or make a small correction while continuing the same typing session.

The detour accepts one complete Normal command, which can include an operator and motion. Some commands that change buffers or modes have special return behavior.

Ctrl-o 0 moves the insertion point without changing the text.

Try it in Vim

  1. While inserting on a line, press Ctrl-o.
  2. Press 0 to move to the line’s first column.
  3. Continue typing; Vim has returned to Insert mode.