Skip to content

Instantly share code, notes, and snippets.

@hiterm
Created September 4, 2016 14:13
Show Gist options
  • Save hiterm/ea985071cd378788bad005ea3892fb65 to your computer and use it in GitHub Desktop.
Save hiterm/ea985071cd378788bad005ea3892fb65 to your computer and use it in GitHub Desktop.
MacVimとiTermにおいて、Escを押したときにIMEを英数に切り替えるKarabiner設定ファイル
<?xml version="1.0"?>
<root>
<inputsourcedef>
<name>JA_IME</name>
<inputmodeid_equal>com.apple.inputmethod.Japanese</inputmodeid_equal>
</inputsourcedef>
<appdef>
<appname>iTERM2</appname>
<equal>com.googlecode.iterm2</equal>
</appdef>
<appdef>
<appname>MACVIM</appname>
<equal>org.vim.MacVim</equal>
</appdef>
<list>
<item>
<name>Leave Insert Mode with EISUU (vim keybind apps)</name>
<identifier>private.vim_keybind_apps_esc_with_eisuu</identifier>
<only>iTERM2,TERMINAL,MACVIM</only>
<autogen>--KeyToKey-- KeyCode::ESCAPE, KeyCode::ESCAPE, KeyCode::JIS_EISUU</autogen>
<autogen>--KeyToKey--
KeyCode::BRACKET_RIGHT, ModifierFlag::CONTROL_L,
KeyCode::ESCAPE, KeyCode::JIS_EISUU</autogen>
</item>
<item>
<name>Switching Hankaku/Zenkaku Spaces</name>
<identifier>private.ime_space_to_hankaku</identifier>
<inputsource_only>JA_IME</inputsource_only>
<autogen>
__KeyToKey__
KeyCode::SPACE, ModifierFlag::SHIFT_L | ModifierFlag::NONE,
KeyCode::SPACE
</autogen>
<autogen>
__KeyToKey__
KeyCode::SPACE, ModifierFlag::SHIFT_R | ModifierFlag::NONE,
KeyCode::SPACE
</autogen>
<autogen>
__KeyToKey__
KeyCode::SPACE,
KeyCode::SPACE, ModifierFlag::SHIFT_L
</autogen>
</item>
</list>
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment