Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
evil: more scaleable way to set initial-state
Browse files Browse the repository at this point in the history
  • Loading branch information
bradwright committed Aug 11, 2013
1 parent f8de2f7 commit 888303d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/init-evil.el
Expand Up @@ -59,10 +59,11 @@
(define-key minibuffer-local-must-match-map [escape] 'abort-recursive-edit)
(define-key minibuffer-local-isearch-map [escape] 'abort-recursive-edit)

;; ansi-term and term-mode have to be in Emacs
(evil-set-initial-state 'term-mode 'emacs)
(evil-set-initial-state 'eshell-mode 'emacs)
;; help-mode is better in Emacs
(evil-set-initial-state 'help-mode 'emacs)))
;; modes to map to different default states
(dolist (mode-map '((comint-mode . emacs)
(term-mode . emacs)
(eshell-mode . emacs)
(help-mode . emacs)))
(evil-set-initial-state `,(car mode-map) `,(cdr mode-map)))))

(provide 'init-evil)

0 comments on commit 888303d

Please sign in to comment.