English / 日本語
▀█▀██ ▀██▀ ▄█▀▀▄█
▐▌ ██ █ █ ▀█▀ █▀▄ ██ █▀▄ █▀▄ █ █ ▀█▀ ██ █ █ █ █ █ ▀█▀ ▄▀▀ █ █
█▄▄██ █ █ █ █ █ ██ █ █ █▄█ █ █ █ ▀▀▄▄ █ █ █ █ █ █ █▀█
▐▌ ██ ▀▄█ █ ▀▄█ ██ █ █ █ ▀▄█ █ █ ██ ▀▄█▄█ █ █ ▀▄▄ █ █
▄█▄ ▄██▄ ━━━━━━━━━━━ ▄██▄ ━━━━━━━━━━━━━━━ █▀▄▄█▀ ━━━━━━━━━━━━━━━━━━ ★ NVIM
A Neovim plugin that automatically switches your input method (IME / input source) based on context.
It removes the friction of constantly toggling between English and non-English input methods when coding, writing, or taking notes.
Works on macOS, Windows, and Linux.
Warning
Breaking changes in v5.0.0
If you’re upgrading from v4.x or earlier, please check the Changelog for details.
- Normalize:
Always return to Latin input (e.g. US keyboard) outside of Insert mode. - Restore:
When you return to Insert mode, restore the input method you were using last time. - Match:
Detect nearby text and automatically switch to the matching input method (Japanese, Chinese, Korean, Russian, …). - Popup notifications:
Show a small popup whenever the plugin switches your input method.
With lazy.nvim:
require('lazy').setup({
{
'amekusa/auto-input-switch.nvim',
config = function()
require('auto-input-switch').setup({
-- your options
})
end
},
})This plugin is highly configurable.
For all available options, see:
Example: enable Match for Japanese, Chinese, and Korean:
require('auto-input-switch').setup({
match = {
enable = true,
languages = {
Ja = { enable = true, priority = 1 },
Zh = { enable = true, priority = 0 },
Ko = { enable = true },
}
},
restore = {
enable = false,
-- If you enable Match, it is recommended
-- to disable Restore to avoid confusion.
},
})Note
Since Japanese and Chinese share some Unicode ranges,
it’s recommended to set priority to control which language takes precedence.
- Neovim: v0.10+
- OS: macOS, Windows, Linux
You need a commanline program to switch input methods in the background.
With the default config:
Some default option values have been changed:
normalize.on- New default:
{ 'QuitPre' } - Old default:
{ 'BufLeave', 'WinLeave', 'FocusGained', 'ExitPre', 'QuitPre' }
- New default:
restore.on- New default:
nil - Old default:
{ 'FocusGained }
- New default:
match.on- New default:
nil - Old default:
{ 'FocusGained }
- New default:
Now Normalize, Restore, and Match work on the buffers without any filetype if normalize|restore|match.filetypes = '*'.
This release includes major breaking changes.
If you’re upgrading, please review carefully.
Breaking Changes:
- Replaced
*.file_patternwith*.filetypes(takes filetype names, not extensions). - New
*.on_mode_changeoptions replace someInsertEnter/InsertLeavedefaults. restore.exclude_patternnow uses regex (not Lua patterns).- Popup window options moved from
popup.*→popup.window.*.
Non-breaking Changes:
popup.labels.*simplified (accepts plain strings).- New options:
normalize.debounce,restore.debounce,match.debounce,*.buf_condition. - New buffer-local commands:
:AutoInputSwitchBuf on|off:AutoInputSwitchBufNormalize on|off:AutoInputSwitchBufRestore on|off:AutoInputSwitchBufMatch on|off
Older releases:
- v4.1.0 – Override
cmd_setper input method - v4.0.0 – Custom popup labels, bug fixes
- v3.0.0 – Added Match feature
- v2.0.0 – Added async support
- v1.0.0 – Initial release
MIT © 2025 Satoshi Soma
