html-fold provides support for hiding and unhiding HTML/XML elements.
html-fold is a minor mode, so that you can use it with some HTML/XML editing major mode, ex. YaHTML, nxml-mode and psgml-mode.
- Put html-fold.el into your load-path
- Byte-compile it, if you would like
- Put following code into your .emacs
(autoload 'html-fold-mode "html-fold" "Minor mode for hiding and revealing elements." t)
- Initialize buffer with
M-x html-fold-buffer
C-c C-o C-b
/C-c C-o b
folding/unfolding bufferC-c C-o C-r
/C-c C-o r
folding/unfolding regionC-c C-o C-p
/C-c C-o p
folding/unfolding paragraphC-c C-o C-o
folding and unfolding case by caseC-c C-o C-e
folding block elementsC-c C-o C-m
folding inline elements
You can skip M-x html-fold-buffer
with add-hook
.
This is an example for add-hook for html-mode.
(add-hook 'html-mode-hook 'html-fold-mode)
html-fold is depeloped based on tex-fold.el
in AUCTeX, written by
Ralf Angeli.