Re-init custom keys after evil-org-set-key-theme
evil-org-set-key-theme blanks out evil-org-mode-map, undoing all our custom keybinds. Using it isn't the correct way to customize evil-org, but it is understandable people would use it expecting it to be, so `+org|setup-evil` will now run after it is called. The "Doom" way to customize evil-org would be to modify the `evil-org-key-theme` variable, but with this change, either will work.
This commit is contained in:
parent
f7a6089956
commit
8cf407caff
1 changed files with 5 additions and 3 deletions
|
@ -22,11 +22,13 @@
|
|||
(def-package! evil-org
|
||||
:when (featurep! :feature evil +everywhere)
|
||||
:hook (org-mode . evil-org-mode)
|
||||
: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 'evil-org-mode-hook #'evil-normalize-keymaps))
|
||||
(add-hook 'evil-org-mode-hook #'evil-normalize-keymaps)
|
||||
:config
|
||||
;; in case it is called later
|
||||
(advice-add #'evil-org-set-key-theme :after #'+org|setup-evil))
|
||||
|
||||
(def-package! evil-org-agenda
|
||||
:when (featurep! :feature evil +everywhere)
|
||||
|
@ -265,7 +267,7 @@ between the two."
|
|||
[remap doom/backward-to-bol-or-indent] #'org-beginning-of-line
|
||||
[remap doom/forward-to-last-non-comment-or-eol] #'org-end-of-line))
|
||||
|
||||
(defun +org|setup-evil ()
|
||||
(defun +org|setup-evil (&rest _)
|
||||
(require 'evil-org)
|
||||
;; By default, TAB cycles the visibility of all children under the current
|
||||
;; tree between three states. I want to toggle the tree between two states,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue