8

I'm using org-mode capture to create small notes and todos. I'm also using evil-mode.

What I'd love to do is to automatically go into insert-mode when I go into a capture. I've tried adding a hook to org-capture-mode-hook and running (evil-insert) in the hook, but that doesn't work. Is there anything else I can try?

Thanks!

Simon

bbbscarter
  • 188
  • 4

2 Answers2

10
(add-hook 'org-capture-mode-hook 'evil-insert-state)
abesto
  • 2,331
  • 16
  • 28
2

You can try

(evil-set-initial-state 'org-capture-mode 'insert)
tungd
  • 14,467
  • 5
  • 41
  • 45
  • I'm afraid this solution did not work for me. I've tried to find out why, but have no idea. – mkaito Jul 24 '14 at 04:20
  • According to [this bug](https://github.com/emacs-evil/evil/issues/1115#issuecomment-450480141), `evil-set-initial-state` works only for major modes while `org-capture-mode` is a minor mode. – kshenoy Dec 30 '18 at 02:01