org: replaced org-cycle with doom/org-toggle-fold

I didn't like the extra keypress to refold trees that I only intended to peek
into. If I want to see the whole tree, I go into it and unfold what I needed.

Note, you can still open the entire subtree with zo and cycle the entire page
with zA or zO.
This commit is contained in:
Henrik Lissner 2017-01-05 18:11:55 -05:00
parent f60d28bab8
commit cbab4e4ee4
2 changed files with 14 additions and 1 deletions

View file

@ -112,6 +112,16 @@ wrong places)."
(delete-char 4))
(insert "[ ] ")))))
;;;###autoload
(defun doom/org-toggle-fold ()
"Toggle the local fold at the point (as opposed to cycling through all levels
with `org-cycle')."
(interactive)
(cond ((org-at-heading-p)
(outline-toggle-children))
((org-at-item-p)
(org-cycle))))
;;;###autoload
(defun doom/org-dwim-at-point ()
"Do-what-I-mean at point. This includes following timestamp links, aligning

View file

@ -77,6 +77,7 @@ system can keep track of each buffer's attachments.")
org-export-coding-system 'utf-8
;; Appearance
outline-blank-line t
org-indent-mode-turns-on-hiding-stars t
org-adapt-indentation nil
org-blank-before-new-entry '((heading . nil) (plain-list-item . auto))
@ -237,6 +238,8 @@ system can keep track of each buffer's attachments.")
:i [(shift tab)] 'doom/org-dedent-or-prev-field
:i [backtab] 'doom/org-dedent-or-prev-field
:n "<tab>" 'doom/org-toggle-fold
:nv "j" 'evil-next-visual-line
:nv "k" 'evil-previous-visual-line
:v "<S-tab>" 'doom/yas-insert-snippet
@ -284,7 +287,7 @@ system can keep track of each buffer's attachments.")
:n "x" 'doom/org-remove-link)
;; TODO Improve folding bindings
:n "za" 'org-cycle
:n "za" 'doom/org-toggle-fold
:n "zA" 'org-shifttab
:n "zc" 'outline-hide-subtree
:n "zC" (λ! (outline-hide-sublevels 1))