code folding

Basile B. via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Mar 18 00:22:12 PDT 2017


On Monday, 13 March 2017 at 17:29:41 UTC, Inquie wrote:
> Does D have any nice way to specify a block for cold folding? I 
> have a very large set of structs and I'd like to be able to 
> code fold them all at once and together.
>
> I have been using
>
> static if(true)
> {
>     ... junk
> }
>
> but the static if is uninformative since that is the only line 
> that is shown when folded. A comment helps but still kinda ugly.
>
> C# has #regions and hopefully D has something as useful.

In Coedit I added regions to the highlighter.

//---+
//----

http://imgur.com/a/hIUTV.

A comment that ends with ---+ start a region. Comment that ends 
with ---- ends a region, if any.


More information about the Digitalmars-d-learn mailing list