Last active
August 29, 2015 14:19
-
-
Save deech/3ac0e100065eb024b29e 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
;; Neat way of getting all Emacs functionality in Evil's insert mode | |
(defun with-evil-mode (mode key-behavior-pairs) | |
(mapcar #'(lambda (pair) | |
(define-key | |
mode | |
(car pair) | |
(cdr pair))) | |
key-behavior-pairs)) | |
(setcdr evil-insert-state-map nil) | |
(with-evil-mode evil-insert-state-map | |
'( | |
([(control f10)] . evil-paste-from-register) | |
([(control f11)] . evil-copy-from-above) | |
([(control f12)] . evil-copy-from-below) | |
([escape] . evil-normal-state))) | |
;; If you want this in Spacemacs just insert the above | |
;; into your .spacemacs file here: | |
;; (defun dotspacemacs/config () | |
;; ... | |
;; (setcdr evil-insert-state-map nil) | |
;; (with-evil-mode evil-insert-state-map | |
;; '( | |
;; ([(control f10)] . evil-paste-from-register) | |
;; ([(control f11)] . evil-copy-from-above) | |
;; ([(control f12)] . evil-copy-from-below) | |
;; ([escape] . evil-normal-state))) | |
;; ... | |
;; ) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment