Re: [Lazarus] Hiding Comments

2010-02-16 Thread John




Graeme Geldenhuys wrote:

  theo wrote:
  
  
I think it would be helpful to hide all comments at times, because while
helpful, they make reading the actually working code a lot harder.

  
  
I just thought of another solution. Change your editor preferences and
change the foreground and background color for comments to be the same as
the editor background. All comments are now invisible. ;-)

Regards,
  - Graeme -
  

I would love to have
different colour options for the three different comment types. I tend
to use // comments for "headings", {} comments for inline
explanations, and (* *) comments for masking stuff out - "it didn't
work last time so don't try it again". I would love to be able to use
a bright colour for the first type, less visible for the second, and
all but invisible for the last. 

ps (Paul) just about the same weather 'just across the water' here in
Gippsland.

cheers,
John Sunderland




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Hiding Comments

2010-02-16 Thread Flávio Etrusco
 wrap them with {%region} so it enables code-folding.

 Code folding still leaves a visible line, so this does not help for one-line
 comments and is not very handy.

I'd like the feature too. Actually I'm quite surprised that Lazarus
doesn't have the ability to automatically fold comments already, guess
I'm not very attentive :-$
But this doesn't suffice, I can't really imagine how the feature
should look like - unless you mean that the text is the problem, so an
option to replace it with some symbol or icon is what you want.


Best regards,
Flávio

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Hiding Comments

2010-02-16 Thread waldo kitty

On 2/16/2010 02:55, Graeme Geldenhuys wrote:

theo wrote:


I think it would be helpful to hide all comments at times, because while
helpful, they make reading the actually working code a lot harder.


I just thought of another solution. Change your editor preferences and
change the foreground and background color for comments to be the same as
the editor background. All comments are now invisible. ;-)


:LOL: but they do still take screen real estate ;)

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Hiding Comments

2010-02-15 Thread theo
I know this is probably hard to implement but I sometimes would really
like to have it. ;-)
I have some heavily commented code, be it for the following reasons.
- Comments explaining what the following code is doing, sometimes line
by line.
- Comments which keep some thoughts of previous implementations in
code (not for shipping) but which might be helpful and be it only for
not going that route again.
- Some todo stuff (I know about the todo feature).

I think it would be helpful to hide all comments at times, because while
helpful, they make reading the actually working code a lot harder.

Does anybody know if this is implemented somewhere in other IDEs?
Does anybody else think this would be a good feature?
Does anybody have a suggestion how to implement this?

Don't beat me, it's just a question and I have no answer. ;-)

Thanks


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Hiding Comments

2010-02-15 Thread Paul Nicholls
- Original Message - 
From: theo x...@theo.ch

To: lazarus@lists.lazarus.freepascal.org
Sent: Tuesday, February 16, 2010 11:28 AM
Subject: [Lazarus] Hiding Comments



I know this is probably hard to implement but I sometimes would really
like to have it. ;-)
I have some heavily commented code, be it for the following reasons.
- Comments explaining what the following code is doing, sometimes line
by line.
- Comments which keep some thoughts of previous implementations in
code (not for shipping) but which might be helpful and be it only for
not going that route again.
- Some todo stuff (I know about the todo feature).

I think it would be helpful to hide all comments at times, because while
helpful, they make reading the actually working code a lot harder.

Does anybody know if this is implemented somewhere in other IDEs?
Does anybody else think this would be a good feature?
Does anybody have a suggestion how to implement this?

Don't beat me, it's just a question and I have no answer. ;-)

Thanks


+10

cheers,
Paul

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Hiding Comments

2010-02-15 Thread theo
Paul Nicholls? This Paul Nicholls?
http://www.efg2.com/Lab/Library/UseNet/1999/0806.txt
;-)


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Hiding Comments

2010-02-15 Thread Paul Nicholls
- Original Message - 
From: theo x...@theo.ch

To: lazarus@lists.lazarus.freepascal.org
Sent: Tuesday, February 16, 2010 12:54 PM
Subject: Re: [Lazarus] Hiding Comments



Well, then welcome on board (if nobody else said that before).
How is the weather like in Australia? ;-)



Thanks :)

it is a lovely sunny 24 degrees here in Tasmania, Australia, very nice :)

cheers,
Paul

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Hiding Comments

2010-02-15 Thread theo
 it is a lovely sunny 24 degrees here in Tasmania, Australia, very nice :)

Humm, it's -10 (Celsius) here in central Switzerland.
Swiss Intl. Air Lines offers three flights to Hobart tomorrow.
Two via Hongkong-Sydney one via Bangkok-Sydney.
Which one to take?
;-)


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Hiding Comments

2010-02-15 Thread Thierry Coq

Hello all,

I join theo in asking for such features, my emphasis is on having more 
structured comments embedded in the code. For example, storing the 
design model, requirements, or traceability to the design and 
requirements. Of course, this would be awkward to manage if a feature 
like the one theo asks is not available. Even better, if there were a 
system to manage the structure of the comments (and turn them on/off), 
maybe in some XML-like syntax...


For example, I would love to be able to mention the Big-O notation of 
the algorithms in a structured manner that can be recovered 
automatically, and can be optionally hidden in the code when not useful.


Best regards,
Thierry

theo wrote:

I know this is probably hard to implement but I sometimes would really
like to have it. ;-)
I have some heavily commented code, be it for the following reasons.
- Comments explaining what the following code is doing, sometimes line
by line.
- Comments which keep some thoughts of previous implementations in
code (not for shipping) but which might be helpful and be it only for
not going that route again.
- Some todo stuff (I know about the todo feature).

I think it would be helpful to hide all comments at times, because while
helpful, they make reading the actually working code a lot harder.

Does anybody know if this is implemented somewhere in other IDEs?
Does anybody else think this would be a good feature?
Does anybody have a suggestion how to implement this?

Don't beat me, it's just a question and I have no answer. ;-)

Thanks


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


  



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Hiding Comments

2010-02-15 Thread Graeme Geldenhuys
Hello Theo,

 I think it would be helpful to hide all comments at times, because while
 helpful, they make reading the actually working code a lot harder.


That's why I prefer external documentation like is done with FPC and
Lazarus projects - using XML files.

Alternatively, keep most of your comments above the
method/function/procedure. If you want to hide them automatically, simply
wrap them with {%region} so it enables code-folding.

eg:

 {%region 'comments hidden by default' -fold}
 { This is my very long comment that goes on for many lines...}
 {%endregion}
 procedure MyProc;
 begin
   ...
 end;


The '-fold' in the %region line will tell the IDE to code-fold than region
by default. I use this for all code auto-generated and managed by fpGUI's
UI Designer.


The last solution is to simply not comment your code! Make it the next
developers problem. :-)


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Hiding Comments

2010-02-15 Thread Graeme Geldenhuys
theo wrote:
 
 I think it would be helpful to hide all comments at times, because while
 helpful, they make reading the actually working code a lot harder.

I just thought of another solution. Change your editor preferences and
change the foreground and background color for comments to be the same as
the editor background. All comments are now invisible. ;-)



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus