From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.help Subject: Re: multiple collapse sections of code? Date: Wed, 04 Oct 2006 09:37:24 +0200 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1159947767 22610 80.91.229.2 (4 Oct 2006 07:42:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 Oct 2006 07:42:47 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 04 09:42:46 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GV1Ot-0005NX-22 for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Oct 2006 09:42:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GV1Os-00063M-Dv for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Oct 2006 03:42:42 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Original-X-Trace: individual.net kkOkz6uiX7uscQw9HW/KzQKX+RP5X3WO2s/nIwtR4wurmSjyEz User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) Cancel-Lock: sha1:gyBmOMgBrJquFMIaPE/s1E3Ihfk= Original-Xref: shelby.stanford.edu gnu.emacs.help:142168 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:37787 Archived-At: "Mickey Ferguson" 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 "") 'hide-subtree) (define-key outline-minor-mode-map (kbd "") '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