www.digitalmars.com         C & C++   DMDScript  

D - Method display folding - #region ...

reply "Matthew Wilson" <matthew stlsoft.org> writes:
I know I'm going to get flamed to death here, but since Andy Friesen has
been able to debug D with VS.NET, it occurs to me that I might start using
that to do my D. The obvious next step would be to get D to support the
#region / #endregion so that we could use method display folding. Since D

definition in the same place, this would be very helpful.

I've just tried it, and it works a treat!

Take your best shots ...
Oct 11 2003
next sibling parent reply "Sean L. Palmer" <palmer.sean verizon.net> writes:
What are you talking about?  The feature is turned off by default for C/C++
(and D, if you have it set up to pretend to be C).

Go to Tools|Options|Text Editor|C/C++|Formatting and check "Enter outlining
mode when files open".  Or just go to Edit | Outlining and mess with that.

It works on any { / } pair and on /* and */ pairs too.  Not sure what
#region / #endregion are supposed to do.  It doesn't show up in the VC.NET
help.

Sean

"Matthew Wilson" <matthew stlsoft.org> wrote in message
news:bma757$2juh$1 digitaldaemon.com...
 I know I'm going to get flamed to death here, but since Andy Friesen has
 been able to debug D with VS.NET, it occurs to me that I might start using
 that to do my D. The obvious next step would be to get D to support the
 #region / #endregion so that we could use method display folding. Since D

 definition in the same place, this would be very helpful.

 I've just tried it, and it works a treat!

 Take your best shots ...
Oct 12 2003
next sibling parent "Matthew Wilson" <matthew stlsoft.org> writes:
Cool!

Thanks Sean


"Sean L. Palmer" <palmer.sean verizon.net> wrote in message
news:bmcfe0$2hrh$1 digitaldaemon.com...
 What are you talking about?  The feature is turned off by default for
C/C++
 (and D, if you have it set up to pretend to be C).

 Go to Tools|Options|Text Editor|C/C++|Formatting and check "Enter
outlining
 mode when files open".  Or just go to Edit | Outlining and mess with that.

 It works on any { / } pair and on /* and */ pairs too.  Not sure what
 #region / #endregion are supposed to do.  It doesn't show up in the VC.NET
 help.

 Sean

 "Matthew Wilson" <matthew stlsoft.org> wrote in message
 news:bma757$2juh$1 digitaldaemon.com...
 I know I'm going to get flamed to death here, but since Andy Friesen has
 been able to debug D with VS.NET, it occurs to me that I might start
using
 that to do my D. The obvious next step would be to get D to support the
 #region / #endregion so that we could use method display folding. Since
D

and
 definition in the same place, this would be very helpful.

 I've just tried it, and it works a treat!

 Take your best shots ...
Oct 12 2003
prev sibling parent Luke D <Luke_member pathlink.com> writes:
#region and #endregion work like {}s with respect to folding.  You can put them
around any section of code so that it folds without needing to put it into a
code block first.  It's pretty useful, and there might be a way to get the IDE
to fold user specified symbols so /+ and +/ could be added and maybe something
like /+region+/ and /+endregion+/.

In article <bmcfe0$2hrh$1 digitaldaemon.com>, Sean L. Palmer says...
What are you talking about?  The feature is turned off by default for C/C++
(and D, if you have it set up to pretend to be C).

Go to Tools|Options|Text Editor|C/C++|Formatting and check "Enter outlining
mode when files open".  Or just go to Edit | Outlining and mess with that.

It works on any { / } pair and on /* and */ pairs too.  Not sure what
#region / #endregion are supposed to do.  It doesn't show up in the VC.NET
help.

Sean

"Matthew Wilson" <matthew stlsoft.org> wrote in message
news:bma757$2juh$1 digitaldaemon.com...
 I know I'm going to get flamed to death here, but since Andy Friesen has
 been able to debug D with VS.NET, it occurs to me that I might start using
 that to do my D. The obvious next step would be to get D to support the
 #region / #endregion so that we could use method display folding. Since D

 definition in the same place, this would be very helpful.

 I've just tried it, and it works a treat!

 Take your best shots ...
Oct 12 2003
prev sibling parent "Julio César Carrascal Urquijo" <adnoctum phreaker.net> writes:
"Matthew Wilson" <matthew stlsoft.org> wrote in message
news:bma757$2juh$1 digitaldaemon.com...
 that to do my D. The obvious next step would be to get D to support the
 #region / #endregion so that we could use method display folding. Since D

 definition in the same place, this would be very helpful.
I use Scite editor from the Scintilla project (http://www.scintilla.org) wich allows display folding on any code block (braces for C-like languages and begin/end for Pascal or Vb) so I can always fold public/private members, function bodies an stuff. void main() { } public {// Some block of related functions void some_func1() {} void some_func2() {} void some_func3() {} } The only feature that is still missing is the ability to surround declarations (like in the example but without the public keyword) so maybe the compiler should allowed braces at declaration level.
Oct 12 2003