31.7 Hideshow minor mode
Hideshow minor mode provides selective display of portions of a
program, known as blocks. You can use M-x hs-minor-mode
to enable or disable this mode, or add
hs-minor-mode to the
mode hook for certain major modes in order to enable it automatically
for those modes.
Just what constitutes a block depends on the major mode. In C mode
or C++ mode, they are delimited by braces, while in Lisp mode and
similar modes they are delimited by parentheses. Multi-line comments
also count as blocks.
- C-c @ C-h
- Hide the current block (
- C-c @ C-s
- Show the current block (
- C-c @ C-c
- Either hide or show the current block (
- Either hide or show the block you click on (
- C-c @ C-M-h
- Hide all top-level blocks (
- C-c @ C-M-s
- Show everything in the buffer (
- C-c @ C-l
- Hide all blocks n levels below this block
These variables exist for customizing Hideshow mode.
nil says that hs-hide-all should hide comments too.
- Specifies what kind of hidden blocks to open in Isearch mode.
The value should be one of these four symbols:
- Open only code blocks.
- Open only comments.
- Open both code blocks and comments.
- Open neither code blocks nor comments.
- A list of elements, each specifying how to initialize Hideshow
variables for one major mode. See the variable's documentation string
for more information.