[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Arbitrary folding in emacs
From: |
Thien-Thi Nguyen |
Subject: |
Re: Arbitrary folding in emacs |
Date: |
Fri, 28 Mar 2014 21:00:20 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
() C K Kashyap <ckkashyap@gmail.com>
() Fri, 28 Mar 2014 14:36:47 +0530
I am trying to go-over a huge c++ file. In vim, I can collapse a
huge set of lines by simply highlighting it an then doing a zf.
I was wondering if I can do something similar in emacs - rather
how I can do it in emacs.
I tried hs-minor-mode but it appears to have pre-defined notions
of "foldable" blocks.
You can (ab)use ‘hs-hide-comment-region’, like so:
(defun hs-hide-region (beg end)
"Basically (hs-hide-comment-region BEG END), as a command."
(interactive "r")
(hs-hide-comment-region beg end))
Does that work for you? I tested lightly w/ Emacs Lisp only.
(See also ‘hs-set-up-overlay’.)
--
Thien-Thi Nguyen
GPG key: 4C807502
(if you're human and you know it)
read my lisp: (responsep (questions 'technical)
(not (via 'mailing-list)))
=> nil
pgpDqIqoVLoPY.pgp
Description: PGP signature
- Re: Arbitrary folding in emacs, (continued)
- Re: Arbitrary folding in emacs, C K Kashyap, 2014/03/28
- Re: Arbitrary folding in emacs, Tim Visher, 2014/03/28
- Re: Arbitrary folding in emacs, Nicolas Richard, 2014/03/28
- Re: Arbitrary folding in emacs, Stefan Monnier, 2014/03/28
- Re: Arbitrary folding in emacs, Nicolas Richard, 2014/03/30
- Re: Arbitrary folding in emacs, Tassilo Horn, 2014/03/28
- Re: Arbitrary folding in emacs, Jai Dayal, 2014/03/28
- Re: Arbitrary folding in emacs, Jarek Czekalski, 2014/03/29
- Re: Arbitrary folding in emacs, Marcin Borkowski, 2014/03/29
- Re: Arbitrary folding in emacs, Tim Visher, 2014/03/31
Re: Arbitrary folding in emacs,
Thien-Thi Nguyen <=
Re: Arbitrary folding in emacs, Andreas Röhler, 2014/03/31