Thanks for creating vimcode — enjoying using it so far!
Description
In Vim, Ctrl+O in insert mode executes one Normal mode command, then automatically returns to insert mode (:help i_CTRL-O). This is one of the most useful Vim features for quick edits without fully leaving insert mode.
Use cases:
- Quick delete:
Ctrl+O dw — delete a word and continue typing
- Quick navigation:
Ctrl+O b — jump back a word and continue typing
- Quick undo:
Ctrl+O u — undo and continue typing
- Quick replace:
Ctrl+O r{char} — replace a character and continue typing
Current behavior
Ctrl+O is not handled in insert mode. It either does nothing or gets swallowed.
Proposed behavior
- Pressing
Ctrl+O in insert mode enters a transient one-shot normal mode
- Execute exactly one normal-mode command (motion, operator+motion, single-key command like
x, u, r, etc.)
- Automatically return to insert mode after the command completes
Notes
- Counts should work:
Ctrl+O 3w should jump 3 words forward and return to insert
- Operator-pending should work:
Ctrl+O dw should delete a word and return to insert
- If
Escape is pressed during one-shot mode, it should cancel and return to insert (not enter normal mode permanently)
- This is a natural complement to the existing
Escape → normal mode flow for when you just need one quick command
Thanks for creating vimcode — enjoying using it so far!
Description
In Vim,
Ctrl+Oin insert mode executes one Normal mode command, then automatically returns to insert mode (:help i_CTRL-O). This is one of the most useful Vim features for quick edits without fully leaving insert mode.Use cases:
Ctrl+Odw— delete a word and continue typingCtrl+Ob— jump back a word and continue typingCtrl+Ou— undo and continue typingCtrl+Or{char}— replace a character and continue typingCurrent behavior
Ctrl+Ois not handled in insert mode. It either does nothing or gets swallowed.Proposed behavior
Ctrl+Oin insert mode enters a transient one-shot normal modex,u,r, etc.)Notes
Ctrl+O3wshould jump 3 words forward and return to insertCtrl+Odwshould delete a word and return to insertEscapeis pressed during one-shot mode, it should cancel and return to insert (not enter normal mode permanently)Escape→ normal mode flow for when you just need one quick command