Fix evil-org-mode keybinds on first org buffer

evil keeps track of auxiliary keymaps. This list is updated when you
switch states, but it _really_ needs to be updated when minor
modes (with keymaps) are toggled. When this isn't done, their keymaps
aren't recognized and their keys will be unavailable at first.

Since there is no global hook for enabling minor modes, we have to
manually add evil-normalize-keymaps to minor mode hooks.

This commit, specifically, fixes evil-org-mode-map. This also indirectly
fixes folding src blocks for evil users (on the first org buffer).
This commit is contained in:
Henrik Lissner 2018-06-03 12:08:33 +02:00
parent 01b07e573e
commit da9096acac
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -25,7 +25,8 @@
:hook (org-load . evil-org-set-key-theme)
:init
(setq evil-org-key-theme '(navigation insert textobjects))
(add-hook 'org-load-hook #'+org|setup-evil))
(add-hook 'org-load-hook #'+org|setup-evil)
(add-hook 'evil-org-mode-hook #'evil-normalize-keymaps))
(def-package! evil-org-agenda
:when (featurep! :feature evil)