Skip to content

Instantly share code, notes, and snippets.

@boedy
Created September 22, 2016 10:16
Show Gist options
  • Save boedy/7026fe5177fc404c76fd14edba1a3731 to your computer and use it in GitHub Desktop.
Save boedy/7026fe5177fc404c76fd14edba1a3731 to your computer and use it in GitHub Desktop.
<?xml version="1.0"?>
<root>
<!-- <appdef> -->
<!-- <appname>PHPSTORM</appname> -->
<!-- <equal>com.jetbrains.PhpStorm</equal> -->
<!-- </appdef> -->
<item>
<name>Home Row Arrow and Modifier Mode VI style</name>
<item>
<name>What's "Home Row Arrow and Modifier Mode"?</name>
<appendix>Single Key Press Space turns on "Home Row Arrow and Modifier Mode"</appendix>
<appendix>Then you can use JKIL as Left/Down/Up/Right.</appendix>
<identifier vk_config="true">notsave.homerow_vi_mode</identifier>
<autogen>__ShowStatusMessage__ Home Row Arrow and Modifier Mode</autogen>
<!-- Begin UO Mechanics -->
<block>
<autogen>__KeyOverlaidModifierWithRepeat__ KeyCode::U, ModifierFlag::SHIFT_L, KeyCode::VK_MODIFIER_EXTRA5, KeyCode::DELETE, ModifierFlag::CONTROL_L | ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L</autogen>
<autogen>__KeyOverlaidModifierWithRepeat__ KeyCode::U, KeyCode::VK_MODIFIER_EXTRA5, KeyCode::DELETE</autogen>
<autogen>__KeyOverlaidModifierWithRepeat__ KeyCode::O, KeyCode::VK_MODIFIER_EXTRA5, KeyCode::SPACE</autogen>
<config_only>option.homerow_vi_mode_u_o_to_delete_space</config_only>
</block>
<!-- End UO Mechanics -->
</item>
<item hidden="true">
<name>flags</name>
<identifier vk_config="true">notsave.homerow_vi_arrows</identifier>
</item>
<item>
<name>Single Key Press Space turns on "Home Row Arrow and Modifier Mode"</name>
<!-- <only>PHPSTORM</only> -->
<identifier>remap.homerow_vi_mode_space_no_repeat</identifier>
<autogen>__KeyOverlaidModifier__ KeyCode::SPACE, KeyCode::VK_CONFIG_SYNC_KEYDOWNUP_notsave_homerow_vi_mode, KeyCode::SPACE</autogen>
<block>
<config_only>notsave.homerow_vi_mode</config_only>
<autogen>__BlockUntilKeyUp__ KeyCode::SPACE</autogen>
<autogen>__KeyToKey__ KeyCode::H, KeyCode::CURSOR_LEFT, Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::VK_CONFIG_FORCE_ON_notsave_homerow_vi_arrows, Option::KEYTOKEY_AFTER_KEYUP, KeyCode::VK_CONFIG_FORCE_OFF_notsave_homerow_vi_arrows, </autogen>
<autogen>__KeyToKey__ KeyCode::J, KeyCode::CURSOR_DOWN, Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::VK_CONFIG_FORCE_ON_notsave_homerow_vi_arrows, Option::KEYTOKEY_AFTER_KEYUP, KeyCode::VK_CONFIG_FORCE_OFF_notsave_homerow_vi_arrows, </autogen>
<autogen>__KeyToKey__ KeyCode::K, KeyCode::CURSOR_UP, Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::VK_CONFIG_FORCE_ON_notsave_homerow_vi_arrows, Option::KEYTOKEY_AFTER_KEYUP, KeyCode::VK_CONFIG_FORCE_OFF_notsave_homerow_vi_arrows, </autogen>
<autogen>__KeyToKey__ KeyCode::L, KeyCode::CURSOR_RIGHT, Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::VK_CONFIG_FORCE_ON_notsave_homerow_vi_arrows, Option::KEYTOKEY_AFTER_KEYUP, KeyCode::VK_CONFIG_FORCE_OFF_notsave_homerow_vi_arrows, </autogen>
<autogen>__KeyToKey__ KeyCode::F, KeyCode::FN, Option::KEYTOKEY_INCREASE_MODIFIER_FLAGS, ModifierFlag::SIMPLE_VI_MODE_2 </autogen>
<autogen>__KeyToKey__ KeyCode::O, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, KeyCode::RETURN, ModifierFlag::OPTION_L | ModifierFlag::COMMAND_L, </autogen>
<autogen>__KeyToKey__ KeyCode::O, KeyCode::RETURN, ModifierFlag::SHIFT_L, </autogen>
<autogen>__KeyToKey__ KeyCode::D, KeyCode::DELETE, ModifierFlag::FN, </autogen>
<autogen>__KeyToKey__ KeyCode::S, KeyCode::CURSOR_UP, ModifierFlag::OPTION_L, </autogen>
</block>
</item>
<item>
<identifier>option.homerow_vi_mode_u_o_to_delete_space</identifier>
</item>
</item>
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment