Created
April 2, 2013 13:07
-
-
Save cofi/5292066 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(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