Next: , Previous: Menu Items, Up: Editing Files


5.5 Rectangles

Rectangle commands operate on a rectangular area of the text, that is all the characters between two columns in a certain range of lines.

A rectangle is selected using the standard selection mechanism. You can therefore use either the mouse to highlight the proper region, or <shift> and the cursor keys to extend the selection, or the Emacs selection (with the mark and the current cursor location) if you have activated the emacs.py plugin.

Visually, a selected rectangle is exactly the same as the standard selection. In particular, the characters after the last column, on each line, will also be highlighted. The way the selection is interpreted (either as a full text or as a rectangle) depends on the command you then chose to manipulate the selection.

If you chose one of the commands from the /Edit/Rectangles menu, the actual rectangle will extend from the top-left corner down to the bottom-right corner. All characters to the right of the right-most column, although they are highlighted, are not part of the rectangle.

Consider for instance the following initial text:

     package A is
        procedure P;
     
        procedure Q;
     end A;

and assume we have selected from the character "p" in "procedure P", down to the character "c" in "procedure Q".

The following commands can then be used (either from the menu, or you can assign key shortcuts to them via the usual /Edit/Key shortcuts menu.