1

I would like to set some buffers to be opened in insert mode in evil.

For example in read-only buffers there is no point in having a normal mode since i then can't use q to exit but i have to do i q. This is annoying for interactive modes that produce error buffers.

What I have been trying and failed with is as follows:

(evil-set-initial-state view-mode 'insert)
user3139545
  • 6,882
  • 13
  • 44
  • 87

1 Answers1

1

You can modify the variable evil-insert-state-modes, which holds a list of modes that should be started in insert state:

(add-to-list 'evil-insert-state-modes 'view-mode)

There are analogous variables for emacs state, normal state, etc.

Dan
  • 5,209
  • 1
  • 25
  • 37