Delphi coding hints and tips.

Editing code insights the easy way

I find the editing code insights in the environment options dialog a bit torturous, the list box of templates is just to small and UI just plain clunky.

The code insight templates are held in a text file called delphi32.dci in the delphi 3\bin directory. To edit it just open it from within delphi like any other text file. The syntax is very easy to understand, the basic structure is as follows:

[shortcut | description ]
template

Example: Go to the end of the delphi32.dci file and type in the following:

[test|testing editing delphi32.dci]
testing one two three..

Now save delphi32.dci, open any unit type in test and press Ctrl-J.