Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/karimaziev/hideshow-extra

Additional hideshow commands.
https://github.com/karimaziev/hideshow-extra

Last synced: 4 days ago
JSON representation

Additional hideshow commands.

Awesome Lists containing this project

README

        

* hideshow-extra

Additional =hideshow= commands.

[[./hideshow-extra.gif][./hideshow-extra.gif]]

** Installation

Emacs >= 25.1 is required.

*** Manual

1. Download the source code and put it wherever you like, e.g. into =~/.emacs.d/hideshow-extra/=

#+begin_src shell :eval no
git clone https://github.com/KarimAziev/hideshow-extra.git ~/.emacs.d/hideshow-extra/
#+end_src

2. Add the downloaded directory to the load path:

#+begin_src elisp :eval no
(add-to-list 'load-path "~/.emacs.d/hideshow-extra/")
(require 'hideshow-extra)
#+end_src

#+begin_src elisp :eval no
(use-package hideshow-extra
:straight (hideshow-extra
:repo "KarimAziev/hideshow-extra"
:type git
:host github)
:bind ((:map hideshow-extra-mode-map
("TAB" . hideshow-extra-toggle-or-indent)
("S-" . hideshow-extra-cycle)))
:hook ((emacs-lisp-mode . hideshow-extra-mode)
(hideshow-extra-mode . hideshow-extra-hide-initial-comment-block)))
#+end_src

** Commands and modes
*** ~hideshow-extra-mode~

Minor mode that will activate keymap =hideshow-extra-mode-map= with such commands:

| Key | Command |
|-----------+-----------------------------------|
| =TAB= | =hideshow-extra-toggle-or-indent= |
| =S-= | =hideshow-extra-cycle= |

*** ~hideshow-extra-cycle~

Cycle commands defined in the custom variable =hideshow-extra-toggle-all-modes=.

*** ~hideshow-extra-toggle-or-indent~
Toggle hiding/showing a of block or invoke =indent-for-tab-command=. Inside string or comments call =indent-for-tab-command=. otherwise activate =hs-minor-mode= and toggle hiding.

*** ~hideshow-extra-narrow-to-docs~
Hide all blocks except documentation strings.

*** ~hideshow-extra-toggle-all-down~
Toggle folding for nodes after point.
*** ~hideshow-extra-toggle-all-up~
Toggle folding for nodes before point.
*** ~hideshow-extra-toggle-all-keep-current~
Toggle folding for all nodes except current.
*** ~hideshow-extra-toggle-all~
Toggle folding for all nodes.

** Customization

*** ~hideshow-extra-recenter-after-toggle~
Whether to recenter window after toggling.
*** ~hideshow-extra-cycle-commands~
List of functions to cycle with command =hideshow-extra-cycle=.
*** ~hideshow-extra-hide-initial-comment-block-condition~
Function to enable or disable =hs-hide-initial-comment-block=. It is called without arguments. If returned value is non-nil, hide initial block silently, otherwise - do nothing.