[Lazarus] How to disable "auto comment"?

silvioprog silvioprog at gmail.com
Thu Jun 7 20:20:55 CEST 2012

2012/6/6 Bernd <prof7bit at googlemail.com>:
> 2012/6/7 silvioprog <silvioprog at gmail.com>:
>>> http://imagebin.org/215427
> If you don't disable them completely there is a way to make their
> existence at least a bit more useful: If you remove the empty line
> between the comment and the class declaration you can add
> documentation right after the class name (do not remove the class
> name):
> {TSomeThing represents a something and maintains a list
> of TWhatEver objects. It is responsible for doing foo and bar}
> TSomeThing = class()
>   ...
> end;
> Then it will display the contents of the comment in the mouse over
> hints when you hover the mouse over any occurrence of TSomeThing in
> your code. Lazarus will not touch the comment  anymore or move it away
> or change it as long as you leave the class name as the first word of
> the comment.
> Apart from that I also don't see any use for these auto generated
> comments. Especially the ones between the method implementations serve
> absolutely no useful purpose. For quickly finding the implementations
> there is either Ctrl+Shift+Up/Down or the code explorer.

Good tip, thx. :)

Another options would be interesting:

[x] Create public variables for forms.
[x] Create <b>public</b> session.
[x] Create <b>private</b> session.

Then, with: "[ ] Create public variables for forms.", "[ ] Create
<b>public</b> session." and "[ ] Create <b>private</b> session.", the
result is:

unit Unit1;

{$mode objfpc}{$H+}


  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs;

  TForm1 = class(TForm)


{$R *.lfm}


A cleaner code. :)

Silvio Clécio
My public projects - github.com/silvioprog

More information about the Lazarus mailing list