[FEATURE] Vim mode: auto-switch input method to English on Normal mode entry
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When using Claude Code's built-in vim mode (/vim), users who type in non-Latin input methods (Korean, Chinese, Japanese, etc.) face a common pain point: after typing in INSERT mode with their native language input method, pressing Escape to enter NORMAL mode leaves the input method unchanged. This means vim commands (dd, yy, w, b, /search, etc.) don't work until the user manually switches to English.
This is a well-known issue in the vim ecosystem, and editors like Neovim solve it with im-select integration or built-in input method switching on mode change.
Proposed Solution
Automatically switch the OS input method to English/ASCII when entering NORMAL mode, and optionally restore the previous input method when re-entering INSERT mode.
On macOS, this can be achieved using tools like:
im-select—im-select com.apple.keylayout.ABC- - macOS
TISSelectInputSourceAPI
On Linux:
ibus/fcitxcommand-line interfaces- -
xdotoolorxkb-switch
A configuration option similar to VSCode Vim's vim.autoSwitchInputMethod would be ideal:
{
"vim.autoSwitchInputMethod.enable": true,
"vim.autoSwitchInputMethod.defaultIM": "com.apple.keylayout.ABC",
"vim.autoSwitchInputMethod.obtainIMCmd": "/usr/local/bin/im-select",
"vim.autoSwitchInputMethod.switchIMCmd": "/usr/local/bin/im-select {im}"
}
Alternative Solutions
- Caps Lock as input toggle (macOS): Manually toggling works, but the core problem is not having to toggle — it's that you don't know which input method is currently active. You can't tell if you're in English or Korean until you start typing, which leads to wasted keystrokes and frustration.
- - Karabiner-Elements / OS-level key remapping: Mapping input method switch to Escape doesn't work because the switch should happen when entering NORMAL mode inside Claude Code, not globally on every Escape press. Other apps use Escape for completely different purposes (closing dialogs, canceling operations). The trigger must be scoped to Claude Code's vim mode transitions, not to the physical key.
Priority
Medium - Would be very helpful
Feature Category
Interactive mode (TUI)
Use Case Example
- I enable vim mode with
/vimin Claude Code - 2. I type a prompt in Korean (my native language) in INSERT mode
- 3. I press Escape to enter NORMAL mode to navigate or edit my prompt
- 4. My input method is still Korean, so pressing
ddtypes Korean characters instead of executing the vim delete-line command - 5. I have to manually switch to English input, perform the vim command, then switch back to Korean to continue typing
Expected behavior: Pressing Escape automatically switches input to English. Re-entering INSERT mode restores Korean input.
Additional Context
Prior art
This is a solved problem in other vim-based tools:
- IdeaVim Extension (hadix-lin/ideavim_extension): JetBrains IDEs have a
keep-english-in-normalfeature that automatically switches to English when entering Normal mode and restores the previous input method when re-entering Insert mode. This is exactly the behavior we'd like in Claude Code. - - VSCode Vim:
vim.autoSwitchInputMethodsettings provide the same functionality. - - - Neovim: Native
im-selectintegration via plugins.
Impact
This affects all CJK (Chinese, Japanese, Korean) users who use vim mode — a significant portion of the developer community in East Asia. Without this feature, vim mode is essentially unusable for non-English input method users without constant manual input switching.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗