[REBOL] Re: Folding browser & editor
From: chalz:earthlink at: 23-Dec-2002 19:52
> example: func [...
> ] [...
> ]
>
> One set of brackets per line, then you can place a little button of sorts to
> expand the brackets. That is how jEdit works and I quite like it, but jEdit
Wouldn't it be possible, though, for the text window to sense brackets,
after a fashion, 'highlight' brackets once they've been paired so that they
appear, say, blue and underlined; and clicking on that blue/underlined bracket
causes all within that bracket and its pair to collapse? Then, once you've got
[...] or [...\r], the brackets and dots would be similarly blue/underlined,
which you can click on to re-expand? I don't know about the feasibility of
this, but it seems like a fair idea to me ;)
However, the ability, yes, for a hot key to open and another to close, based
upon cursor location, would be useful. I say one for each operation, rather
than a single key, since you might have nested blocks, such as:
[
[
123
]
456
]
If you place the cursor at 123, or one of the brackets around 123, and hit
the hotkey, it would fold up that section. However, if you then wished to
close up all of it, hitting the same key might pop the 123 section back open,
which you don't want to do. So, anyways, just suggesting separate open&close
hotkeys
--Charles