Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsh!cbnewse!danj1 From: Dan_Jacobson@ATT.COM Newsgroups: comp.editors Subject: Re: Xedit is better than vi and emacs Message-ID: Date: 28 Apr 91 11:16:26 GMT References: <1991Apr21.011316.13111@zorch.SF-Bay.ORG> <1991Apr23.024525.13795@cs.ucla.edu> <1991Apr24.155049.21710@njitgw.njit.edu> <1991Apr26.155233.7486@chinet.chi.il.us> Sender: news@cbnewse.att.com (NetNews Administrator) Reply-To: might as well reply to netnews, it's the usual editor war Organization: AT&T-BL, Naperville IL, USA Lines: 63 In-Reply-To: les@chinet.chi.il.us's message of 26 Apr 91 15: 52:33 GMT In article <1991Apr24.155049.21710@njitgw.njit.edu> ken@hertz.njit.edu (ken ng cccc) writes: >Instead of scrolling through the actual function source code each and every >time, if you could hide or close off certain sections of code from being >presently displayable, you could find the functions easier. If you were >not sure how function 'foo' works, you could open up/display the text that >was hidden. GNU Emacs got things like that: set-selective-display: Set selective-display to ARG; clear it if no arg. When selective-display is a number > 0, lines whose indentation is >= selective-display are not displayed. selective-display's value is separate for each buffer. narrow-to-region: Restrict editing in this buffer to the current region. The rest of the text becomes temporarily invisible and untouchable but is not deleted; if you save the buffer in a file, the invisible text is included in the file. C-x w makes all visible again. outline-mode: Set major mode for editing outlines with selective display. Headings are lines which start with asterisks: one for major headings, two for subheadings, etc. Lines not starting with asterisks are body lines. Body text or subheadings under a heading can be made temporarily invisible, or visible again. Invisible lines are attached to the end of the heading, so they move with it, if the line is killed and yanked back. A heading with text hidden under it is marked with an ellipsis (...). Commands: C-c C-n outline-next-visible-heading move by visible headings C-c C-p outline-previous-visible-heading C-c C-f outline-forward-same-level similar but skip subheadings C-c C-b outline-backward-same-level C-c C-u outline-up-heading move from subheading to heading Meta-x hide-body make all text invisible (not headings). Meta-x show-all make everything in buffer visible. The remaining commands are used when point is on a heading line. They apply to some of the body or subheadings of that heading. C-c C-h hide-subtree make body and subheadings invisible. C-c C-s show-subtree make body and subheadings visible. C-c C-i show-children make direct subheadings visible. No effect on body, or subheadings 2 or more levels down. With arg N, affects subheadings N levels down. M-x hide-entry make immediately following body invisible. M-x show-entry make it visible. M-x hide-leaves make body under heading and under its subheadings invisible. The subheadings remain visible. M-x show-branches make all subheadings at all levels visible. The variable outline-regexp can be changed to control what is a heading. A line is a heading if outline-regexp matches something at the beginning of the line. The longer the match, the deeper the level. Turning on outline mode calls the value of text-mode-hook and then of outline-mode-hook, if they are non-nil. ---------- etc. etc. and I probably forgot a few. Just more food for the standard editor war...