With auctex I can run TeX-fold-env
the environment on which point currently is located.
How can I fold all environments foo
(\begin{foo}... \end{foo}
) in my buffer at once? And how to unfold all occurences of foo
?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this community(defun latex-fold-foo ()
(interactive)
(let ((env (read-from-minibuffer "Environment: ")))
(save-excursion
(goto-char (point-min))
(while (search-forward (format "begin{%s}" env) nil t)
(TeX-fold-env)))))