LoginSignup
2
2

More than 5 years have passed since last update.

VimでEsc押下時に英数入力に変更する

Posted at

[目的]
VimでEsc押下時に英数入力に変更する

[対象]
Terminal, iTerm2, Cloud9, MacVim

[環境]
OS X El Capitan 10.11.6

[手順]
1. Install Karabiner-Elements
Download From https://pqrs.org/osx/karabiner/
2. Create Setting_File
Launch Terminal or iTerm2
vi ~/.config/karabiner/assets/complex_modifications/FromEscapeToJapanese_eisuu.json

FromEscapeToJapanese_eisuu.json
{
  "title": "Terminal等でESC時に日本語入力を英数に",
  "rules": [
        {
  "description": "Terminal等でESCを押したときに日本語入力を英数に切り替える。",
  "manipulators": [
       {
        "type": "basic",
        "from": { "key_code": "escape", "modifiers": { "optional": [ "any" ] } },
        "to": [ { "key_code": "japanese_eisuu" }, { "key_code": "escape" } ],
        "conditions": [ { "type": "frontmost_application_if",
        "bundle_identifiers": [
          "^com\\.apple\\.Terminal$",
          "^org\\.vim\\.",
          "^com\\.googlecode\\.iterm2$",
          "^org\\.mozilla\\.firefox$",
          "^com\\.google\\.Chrome$",
          "^com\\.apple\\.Safari$"
       ]
      }
     ]
    }
   ]
  }
 ]
}

3. Enable Setting
Launch Karabiner-Elements
Complex Modifications > Rules > [Add rule]
Enable rule 'Terminal等でESC時に日本語入力を英数に'
Restart Terminal or Cloud9

[参考]
https://qiita.com/takaeda/items/38ecf7d98d1a3ef99ef0

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2