LinuxでVSCodeのVim拡張利用時にインサートモード終了で日本語入力をオフにする方法

この記事は公開から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}"

参考ウェブサイトなど

以上です。

シェアする

  • このエントリーをはてなブックマークに追加

フォローする