Created
April 11, 2017 12:02
-
-
Save mihkels/0bf5086f32cff785e1a79384ef3cf48a to your computer and use it in GitHub Desktop.
Get vim mode with Hammerspool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function keyCode(key) | |
return function() hs.eventtap.keyStroke({}, key) end | |
end | |
hs.hotkey.bind({"cmd", "alt"}, 'h', keyCode('left') , nil, keyCode('left')) | |
hs.hotkey.bind({"cmd", "alt"}, 'j', keyCode('down') , nil, keyCode('down') ) | |
hs.hotkey.bind({"cmd", "alt"}, 'k', keyCode('up') , nil, keyCode('up') ) | |
hs.hotkey.bind({"cmd", "alt"}, 'l', keyCode('right'), nil, keyCode('right') ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment