Previous: , Up: Outline Mode   [Index]


10.5.6 Foldout Package

The ‘Foldout’ package extends ‘Outline’ mode with folding commands. In ‘Foldout’ mode you zoom in on a nested portion of the outline while hiding its relatives at higher levels.

To enable:

M-x load-library RET foldout RET

or place the following in your inti file:

(with-eval-after-load "outline"
  (require 'foldout))

To use:

  1. foldout-zoom-subtree (‘C-c C-z’) : Exposes body and 2 child subheadings, while narrowing the buffer so only level-1 heading, the body, and level-2 headings are visible.
  2. Now to look under one of the level-2 headings, position the cursor on it and use ‘C-c C-z’ again. This exposes the level-2 body and its level-3 child subheadings and narrows the buffer again.
  3. foldout-zoom-subtree ARG (‘C-u C-c C-z’) : For only child subheadings specify a numeric argument.
  4. foldout-zoom-subtree ARG (‘M-2 C-C C-z’) : The number of levels of children can be specified too (compare ‘M-x outline-show-children’), e.g., ‘M-2 C-c C-z’ exposes two levels of child subheadings.
  5. Zooming in on successive subheadings can be done as much as you like.
  6. A string in the mode line shows how deep you’ve gone.
  7. foldout-zoom-subtree NEG-ARG (‘M-- C-c C-z’) : The body only can be specified with a negative argument.
  8. foldout-zoom-subtree ZERO-ARG (‘M-o C-c C-z’) : The whole subtree can be expanded, similarly to ‘C-c C-s’ (‘M-x outline-show-subtree’), by specifying a zero argument.
  9. While you’re zoomed in, you can still use Outline mode’s exposure and hiding functions without disturbing Foldout.
  10. Also, since the buffer is narrowed, global editing actions will only affect text under the zoomed-in heading. This is useful for restricting changes to a particular chapter or section of your document.
  11. foldout-exit-fold (‘C-c C-x’) : To unzoom (exit) a fold. This hides all the text and subheadings under the top-level heading and returns you to the previous view of the buffer.
  12. foldout-exit-fold NUM-ARG (‘M-2 C-c C-x’) : To exit NUM levels of folds, specify a numeric argument.
  13. foldout-exit-fold ZERO-ARG (‘M-0 C-c C-x’) : To exit all folds specify a zero argument.
  14. foldout-exit-fold NEG-ARG (‘M--2 C-c C-x’) : To cancel the narrowing of a fold without hiding the text and subheadings, specify a negative argument. For example, ‘M--2 C-c C-x’ exits two folds and leaves the text and subheadings exposed.
Variable: foldout-mouse-modifiers

List of modifier keys to apply to foldout’s mouse events. Default value is ‘(meta control)’.

The default ‘(meta control)’ makes foldout bind its functions to ‘M-C-down-mouse-{1,2,3}’.


Previous: Outline Views, Up: Outline Mode   [Index]