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
- <C-o> One Normal command available
- 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
- While inserting on a line, press Ctrl-o.
- Press 0 to move to the line’s first column.
- Continue typing; Vim has returned to Insert mode.