[FEATURE] Configurable initial vim mode for each new prompt

Resolved 💬 1 comment Opened May 16, 2026 by g-i-o-r-g-i-o Closed Jun 15, 2026

Summary

Add a setting to choose which vim mode the composer enters at the start of every new prompt.

Proposed setting

{
  "vim": {
    "initialMode": "insert"
  }
}

| value | behavior |
|------------|--------------------------------------------------------------------------|
| insert | every new prompt starts in INSERT — current default |
| normal | every new prompt starts in NORMAL |
| preserve | keep the mode that was active when the previous prompt was submitted |

Motivation

  • insert (default) fits the most common flow: type first, edit after.
  • normal matches pure-vim discipline — users who hit Esc by reflex at every turn save one keystroke per prompt.
  • preserve avoids being bounced back to INSERT for users who just submitted from NORMAL (e.g., right after :-style editing of the previous prompt).

The default stays insert, so existing users are unaffected.

Scope

  • Applies to the composer only. Slash-command dispatch and other modal overlays are unchanged.
  • Orthogonal to existing vim-mode work (cursor shape #32469, statusline JSON #16788, jk→Esc remap #53039): a pure entry-state setting.

Related

  • openai/codex#21850 — start in INSERT
  • openai/codex#21804 — preserve mode after submit

Codex split this design into two separate proposals. Folding both into a single tri-state setting keeps the configuration surface smaller and makes the three behaviors mutually exclusive by construction.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗