[Feature Request] Allow remapping vim-mode insert-exit key (e.g. jk/jj → Esc)
Summary
Claude Code's built-in vim editor mode hardcodes Esc as the only way to exit
INSERT mode. There's no way to remap this to a common alternative like jk orjj, which many vim users configure via inoremap jk <Esc> in their .vimrc.
Current behavior
- Enable vim mode:
/config→ Editor mode →vim(persists as
"editorMode": "vim" in ~/.claude/settings.json).
- The only way to exit INSERT → NORMAL is pressing
Esc. ~/.claude/keybindings.jsondoes not expose any vim-mode actions, so it
can't be used to rebind this.
- Claude Code does not read the user's system
.vimrc.
Desired behavior
A way to configure a custom insert-mode exit sequence. Two reasonable shapes:
- A dedicated setting in
settings.json, e.g.:
``json``
{
"editorMode": "vim",
"vim": {
"insertExitSequence": "jk"
}
}
- Expose vim actions in
keybindings.json(e.g.vim:exitInsert) so
users can bind arbitrary keys/chords the same way other actions work.
Option 1 is simpler and covers the overwhelmingly common case (single two-key
sequence). Option 2 is more flexible but a bigger surface.
Why it matters
For users with years of muscle memory mapping jk/jj to escape, reaching for
the physical Esc key in Claude Code's prompt is a constant friction point —
it's the one vim surface on their machine that doesn't honor the mapping.
Since Claude Code already ships a vim mode, supporting the most common.vimrc escape remap would close a visible gap without needing full .vimrc
parsing.
Related issues
- #16778 —
Ctrl+[as escape in NORMAL (regression) - #10621 — double-Esc requirement in Plan Mode Q&A
- #2588 — Enter behavior in INSERT
- #42533 — configurable editor keybindings (covers external
Ctrl+Geditor,
not the in-TUI vim mode)
None of these cover remapping the insert-exit key itself.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗