From: Mathias Dahl <brakjoller@gmail.com>
Subject: Re: multiple collapse sections of code?
Date: Wed, 04 Oct 2006 09:37:24 +0200 [thread overview]
Message-ID: <ufye4h6q3.fsf@gmail.com> (raw)
In-Reply-To: mailman.7708.1159895103.9609.help-gnu-emacs@gnu.org
"Mickey Ferguson" <MFerguson@plantcml.com> writes:
> For simplification, I've made the function much smaller, and not
> used real function calls or anything. But as I'm viewing the code,
> suppose that right now I'm not interested in seeing the error
> handling code. Within Visual Studio you can click on a little minus
> sign that is to the left of the braces, and it will collapse and
> hide all of the code that is within the braces, replacing it with a
> plus sign. Clicking on that plus sign expands it so that the error
> handling code is visible again. You can have many parts collapsed
> at any given time.
You should try out `outline-minor-mode'. I use it in Java files
sometimes to hide blocks of code.
For easy access, I have bound new keys to the hide- and show-subtree
commands:
(defun my-outline-minor-mode-keys ()
(define-key outline-minor-mode-map (kbd "<C-kp-subtract>") 'hide-subtree)
(define-key outline-minor-mode-map (kbd "<C-kp-add>") 'show-subtree))
(add-hook 'outline-minor-mode-hook 'my-outline-minor-mode-keys)
To use, place point at a opening bracket and type C-kp-substract (that
is the minus key on the numeric keypad).
Try it out and see if it works for you.
/Mathias
next parent reply other threads:[~2006-10-04 7:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.7708.1159895103.9609.help-gnu-emacs@gnu.org>
2006-10-04 7:37 ` Mathias Dahl [this message]
2006-10-04 17:18 ` multiple collapse sections of code? Colin S. Miller
[not found] <mailman.7769.1160064366.9609.help-gnu-emacs@gnu.org>
2006-10-08 13:36 ` Mathias Dahl
2006-10-05 16:06 Mickey Ferguson
[not found] <mailman.7729.1159981526.9609.help-gnu-emacs@gnu.org>
2006-10-04 17:15 ` Charles philip Chan
2006-10-05 7:17 ` Mathias Dahl
-- strict thread matches above, loose matches on Subject: below --
2006-10-04 17:05 Mickey Ferguson
2006-10-03 17:04 Mickey Ferguson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ufye4h6q3.fsf@gmail.com \
--to=brakjoller@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.