Friday, December 6, 2013

Using GExperts to comment code with date, time and author

I am a happy user of GExperts . From my beginnings in Delphi consider it more a part of the IDE , irreplaceable for its flexibility , speed and how many tasks easier to perform daily.

Luckily I have already migrated to Delphi XE5 and despite being in an experimental version I've used without problems since.

One of the virtues of this package is the ability to add date and time code . this time I want to give a little tip that I find to also add an automatic comment that includes better detail the moment of change , the author and let us start writing a detailed after insertion.

First , we access GExperts settings.

Imagen


Select the option to add date and wrote this


Imagen

Enclosed in quotation marks I have placed the literal text and want to appear in my code and have added a date format option with hour minutes and seconds.

Then add my initials and finalize an arrow that makes reading the subsequent comments .

Then save the changes and at the press anywhere in the editor Ctrl + Alt + code To get this:



Imagen

leaving the cursor at the right point to start writing the comment

An important detail is that eventually the line if they return the edited down to the next line but even with activated comment (this is because we put 3 slash /// . Whether they produce this effect is placed just 2 slash // .

Enjoy!

1 comment:

Erik said...

Interesting way to stretch the tool a little further. You can do something similar with the GExperts Macro Templates editor expert, including inserting other macros such as counters, function names, parameter lists, project version numbers, project names, clipboard contents, etc.