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.

4

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.

  • Awesome! That did it! Maybe there are other things inside evil-emacs-state-modes, that could be removed... Whatever, thanks a lot! :-) – itmuckel Jun 6 '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.

  • 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 6 '16 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.