[outline] move to Navigation; add outshine config
This commit is contained in:
parent
ee5f90dcca
commit
8c6bbdf518
74
init.org
74
init.org
|
@ -2010,6 +2010,45 @@ Don't try to check if there are files with a certain extension...it will lead to
|
|||
("SPC" . scroll-up-command)))
|
||||
#+END_SRC
|
||||
|
||||
*** outline-minor-mode
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package outline
|
||||
:hook (adoc-mode . outline-minor-mode)
|
||||
(gemini-mode . outline-minor-mode)
|
||||
;; Does this cause this error?
|
||||
;; Polymode error (pm--mode-setup ’org-mode): ‘recenter’ing a window that does not display current-buffer.
|
||||
;; (outline-view-change . (lambda () (recenter 3)))
|
||||
:bind (:map outline-minor-mode-map
|
||||
("TAB" . contrapunctus-outline-indent-or-toggle-children)
|
||||
;; this (rather than `outline-show-children') seems to
|
||||
;; be the equivalent of `org-show-subtree'
|
||||
("C-c C-k" . outline-show-branches)
|
||||
;; wow, in adoc-mode these also replace the first letter of the heading with an "e"... 😒
|
||||
;; ("C-c ," . outline-promote)
|
||||
;; ("C-c ." . outline-demote)
|
||||
)
|
||||
("C-c ," . adoc-demote)
|
||||
("C-c ." . adoc-promote)
|
||||
("C-c C-c" . outline-previous-heading)
|
||||
("C-c C-r" . outline-next-heading)
|
||||
("C-c C-h" . nil)
|
||||
("C-c C-h" . outline-up-heading))
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun contrapunctus-outline-indent-or-toggle-children ()
|
||||
(interactive)
|
||||
(if (save-excursion
|
||||
(goto-char (point-at-bol))
|
||||
(looking-at-p outline-regexp))
|
||||
(outline-toggle-children)
|
||||
(indent-for-tab-command)))
|
||||
#+END_SRC
|
||||
*** outshine
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package outshine
|
||||
:commands (outshine-mode))
|
||||
#+END_SRC
|
||||
** scrolling
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq scroll-conservatively 10000
|
||||
|
@ -3395,41 +3434,6 @@ Create advice for =lispy-pair= - if =lispy--in-string-or-comment-p= is true, sel
|
|||
:commands (wgrep-change-to-wgrep-mode))
|
||||
#+END_SRC
|
||||
|
||||
** outline-minor-mode
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package outline
|
||||
:hook (adoc-mode . outline-minor-mode)
|
||||
(gemini-mode . outline-minor-mode)
|
||||
;; Does this cause this error?
|
||||
;; Polymode error (pm--mode-setup ’org-mode): ‘recenter’ing a window that does not display current-buffer.
|
||||
;; (outline-view-change . (lambda () (recenter 3)))
|
||||
:bind (:map outline-minor-mode-map
|
||||
("TAB" . contrapunctus-outline-indent-or-toggle-children)
|
||||
;; this (rather than `outline-show-children') seems to
|
||||
;; be the equivalent of `org-show-subtree'
|
||||
("C-c C-k" . outline-show-branches)
|
||||
;; wow, in adoc-mode these also replace the first letter of the heading with an "e"... 😒
|
||||
;; ("C-c ," . outline-promote)
|
||||
;; ("C-c ." . outline-demote)
|
||||
)
|
||||
("C-c ," . adoc-demote)
|
||||
("C-c ." . adoc-promote)
|
||||
("C-c C-c" . outline-previous-heading)
|
||||
("C-c C-r" . outline-next-heading)
|
||||
("C-c C-h" . nil)
|
||||
("C-c C-h" . outline-up-heading))
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun contrapunctus-outline-indent-or-toggle-children ()
|
||||
(interactive)
|
||||
(if (save-excursion
|
||||
(goto-char (point-at-bol))
|
||||
(looking-at-p outline-regexp))
|
||||
(outline-toggle-children)
|
||||
(indent-for-tab-command)))
|
||||
#+END_SRC
|
||||
|
||||
** custom.el
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq custom-file "~/.emacs.d/custom.el")
|
||||
|
|
Loading…
Reference in New Issue