[FEATURE] Vim mode: add langmap support for non-Latin keyboard layouts (Russian, Greek, Arabic, etc.)
Problem
Vim mode in Claude Code only recognizes Latin characters for commands. When a non-Latin keyboard layout is active (Russian, Greek, Ukrainian, Arabic, Hebrew, etc.), all vim normal-mode commands stop working — j/k navigation, i/a/o to enter insert mode, d/c/y operators, etc.
This forces users to constantly switch keyboard layout just to use vim keybindings, which defeats the purpose of modal editing for faster input.
Who is affected
Every vim-mode user whose primary keyboard layout is non-Latin. This includes but is not limited to:
- Cyrillic: Russian, Ukrainian, Bulgarian, Serbian
- Greek
- Arabic / Hebrew
- CJK input methods (partially)
Proposed solution
Implement the equivalent of Vim's langmap option. In Vim, this is configured as:
set langmap=ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz
This maps each non-Latin character to its Latin equivalent only in normal mode, so insert-mode typing remains unaffected.
Russian ЙЦУКЕН → QWERTY mapping for reference
| Key position | Latin | Cyrillic |
|---|---|---|
| q w e r t y u i o p | q w e r t y u i o p | й ц у к е н г ш щ з |
| a s d f g h j k l | a s d f g h j k l | ф ы в а п р о л д |
| z x c v b n m | z x c v b n m | я ч с м и т ь |
So pressing о (Russian) on ЙЦУКЕН layout should behave like j (down), ш like i (insert mode), etc.
Implementation options
- Built-in langmap table for common layouts (Russian ЙЦУКЕН at minimum), enabled automatically when non-Latin input is detected in normal mode
- Configurable langmap via
~/.claude/keybindings.jsonor a dedicated vim config section:
``json``
{
"vim": {
"langmap": "фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz,ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ"
}
}
- Auto-detect approach: if a keypress in normal mode produces a non-ASCII character that has no vim binding, try mapping it through a layout table before giving up
Option 2 (configurable) is the most flexible and aligns with how real Vim handles this.
Related issues
- #27859 — shortcuts don't work with non-Latin layouts (closed as duplicate)
- #18221 — Alt/Option breaks international layouts (closed, not planned)
- #25306 — custom vim insert-mode mappings (closed as duplicate of #13631)
These issues address general shortcut problems but none specifically request langmap for vim normal-mode commands.
Environment
- Claude Code with vim mode enabled (
/vim) - Any OS with a non-Latin keyboard layout
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗