Skip to content

Instantly share code, notes, and snippets.

@cofi
Created April 2, 2013 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cofi/5292066 to your computer and use it in GitHub Desktop.
Save cofi/5292066 to your computer and use it in GitHub Desktop.
(defun switch-in-keymap (key1 key2 keymap)
(let ((cmd1 (lookup-key key1 keymap))
(cmd2 (lookup-key key2 keymap)))
(define-key keymap key1 cmd2)
(define-key keymap key2 cmd1)))
(mapc (lambda (map) (switch-in-keymap "x" "y" map))
(list evil-motion-state-map
evil-normal-state-map
evil-emacs-state-map
evil-visual-state-map))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment