Delphi tips:

Add separator lines to your code with Code Templates

In a source file with many procedures and functions in it, it is often hard to see where a routine starts and ends -- with all the Begin and End statements. So you could add a comments line after each procedure, like this:


But who has time to draw all these lines? Well, Delphi has an answer to that problem: Code Templates. Just press CTRL + J followed by the shortcut for the template you want, and Delphi automatically writes out the code for you.

If you make a template for a comments separator line and set its shortcut to a symbol such as "-", then it will appear at the top of the list, since the list of code templates is sorted alphabetically.

Now, in order to insert a separator line in your code file, all you have to do is press CTRL + J and ENTER.


DelphiLand Club Members of the DelphiLand Club receive our Crash Course Delphi, plus the fully commented source code of numerous projects, plus guaranteed answers from our Delphi Forum. Membership is for life!

TOP   DelphiLand Club Membership  DC Library  Forum  Forum Archives  Crash Course Delphi  Tips  Source Code  Downloads  Links