Evil Mode best practice?

From http://stackoverflow.com/questions/8483182/evil-mode-best-practice

I used a highly customized vim, and now use an even more customized emacs. I think youll find every instance of keymapping in my keymapping config filehttps://github.com/mbriggs/.emacs.d/blob/master/init/init-keymaps.el

Keep in mind, I am rebinding stuff that real emacs users would consider heresy, so YMMV if you ever want to learn “real” emacs (I really don’t).

one thing I would recommend to any ex vimmer is this

;;; esc quits

(define-key evil-normal-state-map [escape] 'keyboard-quit)
(define-key evil-visual-state-map [escape] 'keyboard-quit)
(define-key minibuffer-local-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-ns-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-completion-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-must-match-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-isearch-map [escape] 'minibuffer-keyboard-quit)

so that esc actually quits pretty much anything (like pending prompts in the minibuffer)


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s