Skip to content

Instantly share code, notes, and snippets.

@kidd
Created February 14, 2012 18:31
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kidd/1828878 to your computer and use it in GitHub Desktop.
Save kidd/1828878 to your computer and use it in GitHub Desktop.
'perfect' combination of emacs+evil
;;; https://lists.ourproject.org/pipermail/implementations-list/2012-February/001513.html
(add-to-list 'load-path "~/programmingStuff/evil/")
(require 'evil)
;; remove all keybindings from insert-state keymap
(setcdr evil-insert-state-map nil)
;; but [escape] should switch back to normal state
(define-key evil-insert-state-map [escape] 'evil-normal-state)
(define-key evil-insert-state-map (kbd "jk") 'evil-normal-state)
(define-key evil-insert-state-map (kbd "jj") 'insert-jay)
(defun insert-jay ()
(interactive)
(insert "j"))
(evil-mode)
(define-key help-mode-map (kbd "i") 'evil-emacs-state)
(define-key grep-mode-map (kbd "i") 'evil-emacs-state)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment