Delphi tips :

Source Code Editor


Block-mode in the editor

In order to copy/delete rectangles ('columns') of text in Delphi's Code Editor, press ALT, then use the left mousebutton to mark the rectangle. Afterwards, you can insert this text rectangle as a block at another location!


Find text quickly with Incremental Searching

In the editor window, simply press Ctrl + E and start typing... and the next occurrence of your text is found, without filling out any dialog!

Backspace removes the last character from the search string and moves to the previous match. F3 repeats the search. Just play with it for a while, and discover what a great time saver this trick can be:

d will find the next character d, say in the word Windows
e finds de such as in Sender
l brings you to del as in Delphi
F3 finds the next del as in Deletefile
Backspace brings you back to the de in Sender

To quit this search mode, press Escape, or Enter, or any cursor key, or click anywhere in the text.


Indenting and unindenting a block of code

Start with selecting the lines of code in the Editor. Then, if you want to:

INDENT : press Ctrl-Shift-i one or more times. The text will move to the right.

UNINDENT : press Ctrl-Shift-u one or more times. The text will move to the left.


Record and playback a text-macro in the editor

1. Press Ctrl + Shift + R.
2. Enter the desired text.
3. Press again Ctrl + Shift + R to stop the recording.

Playback is done with Ctrl + Shift + P.
Note: the macro can not be saved, you can only use it in the current session.


 

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