[next] [prev] [prev-tail] [tail] [up]

#### 6.5.2 Blocks

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:

1. Using the mouse, dragging the mouse over existing text selects it.
2. 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.
3. Using the keyboard, hold the Shift key depressed while navigating with the cursor keys.

There are also some special select commands:

1. The current line can be selected using Ctrl-K L.
2. 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.

[next] [prev] [prev-tail] [front] [up]