Fix #4586: evilifiy org-brain
THese should be upstreamed to evil-collection in some form or another.
This commit is contained in:
parent
19d41262e4
commit
71d4748bcf
1 changed files with 25 additions and 3 deletions
|
@ -10,10 +10,32 @@
|
||||||
org-brain-file-entries-use-title nil)
|
org-brain-file-entries-use-title nil)
|
||||||
|
|
||||||
:config
|
:config
|
||||||
(set-evil-initial-state! 'org-brain-visualize-mode 'emacs)
|
(set-popup-rule! "^\\*org-brain"
|
||||||
(set-popup-rule! "^\\*org-brain" :side 'right :size 1.00 :select t :quit nil :ttl nil)
|
:side 'right :size 1.00 :select t :quit nil :ttl nil)
|
||||||
|
|
||||||
(cl-pushnew '("b" "Brain" plain (function org-brain-goto-end)
|
(cl-pushnew '("b" "Brain" plain (function org-brain-goto-end)
|
||||||
"* %i%?" :empty-lines 1)
|
"* %i%?" :empty-lines 1)
|
||||||
org-capture-templates
|
org-capture-templates
|
||||||
:key #'car :test #'equal))
|
:key #'car :test #'equal)
|
||||||
|
|
||||||
|
(when (featurep! :editor evil +everywhere)
|
||||||
|
;; TODO Make a proper evil keybind scheme for org-brain
|
||||||
|
;; REVIEW This should be handled upstream by evil-collection
|
||||||
|
(set-evil-initial-state!
|
||||||
|
'(org-brain-visualize-mode
|
||||||
|
org-brain-select-map
|
||||||
|
org-brain-move-map
|
||||||
|
org-brain-polymode-map)
|
||||||
|
'normal)
|
||||||
|
(defun +org--evilify-map (map)
|
||||||
|
(let (keys)
|
||||||
|
(map-keymap (lambda (event function)
|
||||||
|
(push function keys)
|
||||||
|
(push event keys))
|
||||||
|
map)
|
||||||
|
(apply #'evil-define-key* 'normal map keys)))
|
||||||
|
|
||||||
|
(+org--evilify-map org-brain-visualize-mode-map)
|
||||||
|
(+org--evilify-map org-brain-select-map)
|
||||||
|
(+org--evilify-map org-brain-move-map)
|
||||||
|
(+org--evilify-map org-brain-polymode-map)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue