2

I am switching from vim to emacs and have evil installed. Mostly evil runs perfectly, but after starting emacs the first time and running ibuffer or dired I have to turn on evil-mode (C-z). This is really annoying as I often restart Emacs and assume that I can use vim-Bindings when opening dired or ibuffer.

So how can I always have evil-mode turned on by default?

This question seemed to be leading to the right direction, but I could not get it working.

itmuckel
  • 267
  • 2
  • 12

2 Answers2

5

There are a few variables that determine the state in which Evil starts depending on the major-mode:

  • evil-emacs-state-modes for major-modes coming up in emacs state
  • evil-insert-state-modes for major-modes coming up in insert state

and so on. By default ibuffer-mode is part of evil-emacs-state-modes, which you should remove

(setq evil-emacs-state-modes (delq 'ibuffer-mode evil-emacs-state-modes))

dired-mode should not come up in emacs state by default, though, but the principle is the same.

fifr
  • 91
  • 1
  • Awesome! That did it! Maybe there are other things inside evil-emacs-state-modes, that could be removed... Whatever, thanks a lot! :-) – itmuckel Jun 06 '16 at 21:23
0

Open your init file, and put this in it:

(evil-mode t)

Now, every time Emacs is started, evil-mode will be turned on.

zck
  • 9,092
  • 2
  • 33
  • 65
  • I already have that in my .emacs. Maybe I have to change some settings for ibuffer and dired? That would be a bad solution if I had to add settings for every new major-mode to make it startup in evil-mode, but at least it would be a solution. ;-) – itmuckel Jun 06 '16 at 19:26