Cycle outline and code visibility
Switch branches/tags
Nothing to show
Clone or download
tarsius bicycle-cycle-local: Toggle individual section using both modes
Without this a section that has previously been hidden individually
would have to be "toggled" twice in order to be shown after the parent
has been hidden and then shown again.
Latest commit 42a5db3 Aug 3, 2018
Permalink
Failed to load latest commit information.
.gitignore
Makefile
README.md
bicycle.el

README.md

Cycle outline and code visibility

This package provides commands for cycling the visibility of outline sections and code blocks. These commands are intended to be bound in outline-minor-mode-map and do most of the work using functions provided by the outline package.

This package is named bicycle because it can additionally make use of the hideshow package.

If hs-minor-mode is enabled and point is at the start of a code block, then hs-toggle-hiding is used instead of some outline function. When you later cycle the visibility of a section that contains code blocks (which is done using outline functions), then code block that have been hidden using hs-toggle-hiding, are not extended.

A reasonable configuration could be:

(use-package bicycle
  :after outline
  :bind (:map outline-minor-mode-map
              ([C-tab] . bicycle-cycle)
              ([S-tab] . bicycle-cycle-global)))

(use-package prog-mode
  :config
  (add-hook 'prog-mode-hook 'outline-minor-mode)
  (add-hook 'prog-mode-hook 'hs-minor-mode))