The IDE handles selected text just as the Turbo Pascal IDE handles it. This is slightly different
from the way e.g. Windows applications handle selected text.
Text can be selected in 3 ways:
- Using the mouse, dragging the mouse over existing text selects it.
- Using the keyboard, press Ctrl-K B to mark the beginning of the selected text, and
Ctrl-K K to mark the end of the selected text.
- Using the keyboard, hold the Shift key depressed while navigating with the cursor
There are also some special select commands:
- The current line can be selected using Ctrl-K L.
- The current word can be selected using Ctrl-K T.
In the Free Pascal IDE, selected text is persistent. After selecting a range of text, the cursor can be
moved, and the selection will not be destroyed; hence the term ’block’ is more appropriate for the
selection, and will be used henceforth...
Several commands can be executed on a block:
- Move the block to the cursor location (Ctrl-K V).
- Copy the block to the cursor location (Ctrl-K C).
- Delete the block (Ctrl-K Y).
- Write the block to a file (Ctrl-K W).
- Read the contents of a file into a block (Ctrl-K R). If there is already a block,
this block is not replaced by this command. The file is inserted at the current cursor
position, and then the inserted text is selected.
- Indent a block (Ctrl-K I).
- Undent a block (Ctrl-K U).
- Print the block contents (Ctrl-K P).
When searching and replacing, the search can be restricted to the block contents.