Support custom vim insert-mode mappings (e.g., jj to enter normal mode)
Feature Request
Is your feature request related to a problem?
When using vim mode (/vim), there's no way to configure custom insert-mode mappings. Many vim users rely on inoremap jj <Esc> (or similar mappings like jk) to quickly exit insert mode without reaching for the Escape key. This is one of the most common vim customizations.
Currently, the keybindings system operates at the component level (chat:submit, chat:cancel, etc.) and doesn't have actions for vim-mode operations like entering normal mode. Attempting to use a chord binding like "j j": "chat:cancel" as a workaround breaks normal j typing and triggers the wrong action.
Describe the solution you'd like
Support for custom vim keymaps in vim mode, either through:
- A vim-specific section in
keybindings.jsonwith actions likevim:enterNormalMode - Support for a
.vimrc-style config for Claude Code's vim mode (e.g.,inoremap jj <Esc>) - Passing custom keymaps to the underlying vim mode implementation
Describe alternatives you've considered
- Using Escape to enter normal mode (works but is less ergonomic, which is why
jjmappings are so popular) - Using the chord keybinding
"j j": "chat:cancel"— this intercepts the firstjkeypress entirely, preventing normal typing of the letterj
Additional context
This is a very common vim customization — jj, jk, and kj are among the most popular insert-mode escape mappings in the vim community.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗