Skip to content

feat: Ctrl+O one-shot normal mode#17

Merged
oribarilan merged 1 commit into
mainfrom
feat/ctrl-o-oneshot
Jun 2, 2026
Merged

feat: Ctrl+O one-shot normal mode#17
oribarilan merged 1 commit into
mainfrom
feat/ctrl-o-oneshot

Conversation

@oribarilan

Copy link
Copy Markdown
Owner

Adds Ctrl+O from insert mode (Vim's i_CTRL-O). Run one normal-mode command, auto-return to insert.

Motions, operators with motions, counts, r{char}, and gg all work. Escape cancels and returns to insert. Entering visual mode cancels the one-shot.

Implemented as a boolean flag on VimState (oneShotNormal), matching how Vim handles it internally (restart_edit). A post-processing function checks after each normal-mode keypress whether the command is complete and switches back to insert.

Closes #16

@oribarilan oribarilan force-pushed the feat/ctrl-o-oneshot branch from ebf7c81 to 716c8bb Compare June 2, 2026 21:34
@oribarilan oribarilan merged commit 82a5a0a into main Jun 2, 2026
1 check passed
@oribarilan oribarilan deleted the feat/ctrl-o-oneshot branch June 2, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ctrl+O : one-shot normal mode from insert

1 participant