この記事は公開から4年以上経過しています。
Linuxの入力メソッドFcitx/Fcitx5とVSCodeとVim拡張を利用している環境で、インサートモードでの日本語入力中のESC
押下で日本語入力をOFFにする方法。
対応
VSCodeのsetting.jsonに、Fcitx状態制御ツールfcitx-remote
/fcitx5-remote
の設定を追加する。
※ツールインストール先のパス/usr/bin/
はwhich
コマンド等で調べて適宜設定。
Fcitx
"vim.autoSwitchInputMethod.enable": true,
"vim.autoSwitchInputMethod.defaultIM": "-c",
"vim.autoSwitchInputMethod.obtainIMCmd": "/usr/bin/fcitx-remote",
"vim.autoSwitchInputMethod.switchIMCmd": "/usr/bin/fcitx-remote {im}"
Fcitx5
"vim.autoSwitchInputMethod.enable": true,
"vim.autoSwitchInputMethod.defaultIM": "-c",
"vim.autoSwitchInputMethod.obtainIMCmd": "/usr/bin/fcitx5-remote",
"vim.autoSwitchInputMethod.switchIMCmd": "/usr/bin/fcitx5-remote {im}"
参考ウェブサイトなど
-
archlinux wiki
Fcitx Vim -
GitHub
VSCodeVim/Vim
以上です。