Skip to content

Instantly share code, notes, and snippets.

@edcrypt
Last active February 1, 2016 01:26
Show Gist options
  • Save edcrypt/9edde213be4006b340bb to your computer and use it in GitHub Desktop.
Save edcrypt/9edde213be4006b340bb to your computer and use it in GitHub Desktop.
Right-hand cursor movement on the homerow (better than Vi-style)
;; funcs from http://www.emacswiki.org/emacs/OpenNextLine
;; Textmate Shift+Enter
(global-set-key [S-return] 'ed/open-next-line)
(global-set-key [C-S-return] 'ed/open-previous-line)
;; Map cursor movement keys to right hand's homerow, WASD-style
;; C-n, C-p, C-f, C-b, M-f and M-b still works
;; see my .Xmodmap gist
(global-set-key (kbd "H-i") 'previous-line)
(global-set-key (kbd "H-j") 'backward-char)
(global-set-key (kbd "H-k") 'next-line)
(global-set-key (kbd "H-l") 'forward-char)
(global-set-key (kbd "H-u") 'backward-word)
(global-set-key (kbd "H-o") 'forward-word)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment