lang/org: augment org-cycle, rather than replace it

This removes +org/toggle-fold in favor of a more compatible alternative:
a org-tab-first-hook function that forces org-cycle only to toggle the
current subtree, and not cycle through all visibility states.
This commit is contained in:
Henrik Lissner 2018-04-04 06:56:56 -04:00
parent 5d3f247a7f
commit bc91c55acc
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 19 additions and 23 deletions

View file

@ -251,6 +251,9 @@ between the two."
(defun +org|setup-evil ()
(require 'evil-org)
(add-hook 'org-tab-first-hook #'+org|toggle-only-current-fold)
(map! :map outline-mode-map
:n "^" nil
:n [backtab] nil
@ -267,8 +270,6 @@ between the two."
:ni "C-S-h" #'+org/table-prepend-field-or-shift-left
:ni "C-S-k" #'org-metaup
:ni "C-S-j" #'org-metadown
;; toggle local fold, instead of all children
:n [tab] #'+org/toggle-fold
;; more intuitive RET keybinds
:i "RET" #'org-return-indent
:n "RET" #'+org/dwim-at-point