Terminalのvim上でノーマルモードに戻るとき入力も半角に戻す

一年ぶりぐらいにブログを書いてる気がする。

便利そうなのでメモ。

参考にしたサイトのkeyRemap4MacBookを使った、Terminal上でESCを押したらESC+半角機能は簡単にできた。Controlを空打ちしたときだけESCの代わりになるようしてたのでControlのほうも半角英数機能を持たせたい。それでなんとかしたのが下のコード

<?xml version="1.0"?>
<root>
    <list>
        <item>
            <name>LeaveInsMode with EISUU(Terminal)</name>
            <identifier>private.app_terminal_esc_with_eisuu</identifier>
            <only>TERMINAL</only>
            <autogen>--KeyToKey-- KeyCode::ESCAPE, KeyCode::ESCAPE, KeyCode::JIS_EISUU</autogen>
            <autogen>--KeyOverlaidModifier-- KeyCode::CONTROL_L,ModifierFlag::CONTROL_L |
                ModifierFlag::NONE, KeyCode::CONTROL_L, KeyCode::ESCAPE, KeyCode::JIS_EISUU</autogen>
        </item>
    </list>
</root>


参考
Vimで挿入モードから抜ける時に英数入力に切り替える - ✘╹◡╹✘
http://r7kamura.hatenablog.com/entry/20110217/1297910068

https://github.com/tekezo/KeyRemap4MacBook/blob/version_8.0.0/src/core/server/Resources/include/checkbox/samples.xml