never go into evil-emacs-mode, always stay in normal mode

This commit is contained in:
syl20bnr 2013-01-03 15:36:44 -05:00
parent 5a198efa0c
commit 4bf9d1d0ea
2 changed files with 4 additions and 9 deletions

View File

@ -8,15 +8,10 @@
(setq evil-motion-state-cursor '("purple" box))
(evil-mode 1)
;;Make evil-mode up/down operate in screen lines instead of logical lines
(define-key evil-normal-state-map (kbd "j") 'evil-next-visual-line)
(define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line)
;;Exit insert mode by pressing j and then k quickly
(key-chord-define evil-insert-state-map "jk" 'evil-normal-state)
(key-chord-define evil-visual-state-map "jk" 'evil-normal-state)
(define-key evil-normal-state-map (kbd "SPC") 'ace-jump-mode)
;; This is an endless debate and is just a matter of convention
;; I prefer to stay on the original character when leaving insert mode
;; (initiated with 'i')
;; (initiated with 'i').
(setq evil-move-cursor-back nil)
(add-hook 'evil-emacs-state-entry-hook 'evil-normal-state)

View File

@ -3,11 +3,11 @@
(propertize evil-mode-line-tag 'font-lock-face
;; Don't propertize if we're not in the selected buffer
(cond ((not (eq (current-buffer) (car (buffer-list)))) '())
((evil-normal-state-p) '(:background "orange" :foreground "black"))
((evil-insert-state-p) '(:background "green" :foreground "black"))
((evil-emacs-state-p) '(:background "red" :foreground "black"))
((evil-motion-state-p) '(:background "purple" :foreground "black"))
((evil-visual-state-p) '(:background "gray" :foreground "black"))
((evil-normal-state-p) '(:background "orange" :foreground "black"))
(t '()))))
(setq-default mode-line-format