TUI Vim mode: support configurable `jj` escape sequence from insert mode
What variant of Codex are you using?
CLI
What feature would you like to see?
Please add opt-in support for a configurable multi-key Vim insert-mode escape sequence, commonly jj, so users can leave insert mode and return to normal mode without pressing Esc.
Current behavior:
tui.vim_mode_default = trueenables Vim composer mode.Escexits Vim insert mode to normal mode.tui.keymapaccepts single key bindings and lists of alternate single key bindings, but a multi-character binding such as"jj"is rejected by--strict-config.
Desired behavior:
Support either a dedicated Vim insert escape setting:
[tui.vim]
insert_escape_sequence = "jj"
insert_escape_timeout_ms = 300
or a generalized multi-key sequence model that can express the same behavior for the Vim insert-mode composer.
The setting should be opt-in and disabled by default, so current j typing behavior is unchanged unless the user configures the sequence.
Why this matters
inoremap jj <Esc> is a common Vim/Neovim ergonomic mapping. It is useful in terminal and tmux workflows where reaching for Esc is slower or where escape timing can feel awkward. Codex already has native Vim composer mode, so this would close a small but high-frequency muscle-memory gap for Vim users.
Additional information
I searched existing issues and PRs before filing and did not find a direct duplicate for jj/multi-key Vim insert escape.
Related but not duplicate:
- #21850 requests starting Vim mode in insert mode by default.
- #12508 requested native Vim modal composer mode broadly.
- #3049 requested configurable hotkeys broadly.
- #24238 and #23926 cover other Vim-mode parity improvements.
Local validation:
codex-cli 0.141.0and0.142.0both rejecttui.keymap.composer.submit = "jj"under--strict-config.- Both versions accept
tui.keymap.composer.submit = "j"andtui.keymap.composer.submit = ["j", "ctrl-m"], which suggests the current keymap model supports alternate single key events but not key sequences.
I understand external code PRs are by invitation per docs/contributing.md; I am filing this as a feature request and can help with a focused reference implementation if maintainers want one.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗