Block|Move Lines & Columns

(available in EditPad Pro only)

The Lines and Columns submenu of the Block menu lists various commands for shifting blocks of text around. It also has Prefix and Suffix commands for inserting something at the start or end of each selected line.

When you’ve made a linear selection (a selection that follows the flow of the text), you can only move lines. Lines are moved entirely. If the first and/or last line in the selection are only partially selected, the selection first expands itself to include those lines entirely. When moving the block one line up, the block and the line above it swap places. After the action, the unselected line that was above the block will be below it. Moving the block one line down does the opposite.

When you’ve made a rectangular selection, only the selected columns are moved. When moving the rectangular block one line up, the columns spanning the width of the selection in the line above the selection are removed. Then the selected block is moved up one line, filling up the space created by removing part of the line that was above the selection. The removed characters are then reinserted in the empty space created on the line that use to be the last line in the selection. If the line above the block did not have any characters to remove, spaces are inserted into the last line instead. The original block remains selected, now positioned one line higher in the file. Moving a rectangular block one line down does the opposite.

Rectangular selections can also be shifted to the left or the right. When shifting a block to the left, the character immediately to the left of the block on each line partially selected by the block is removed. This character is then reinserted on the same line immediately to the right of the block. The original block remains selected, now positioned one column closer to the left. When shifting a block to the right, the character immediately to the right of the block is removed, and reinserted to the left of the block. If there is no character to the right of the block on a particular line, a space is inserted to the left of the block instead. You can shift a block as far out to the right as you want.

If no text is selected at all, you can still use the commands to move lines up or down. Then, the line containing the text cursor is moved.

See Also

Block menu
Block|Outdent
Block|Indent
Block|Rectangular Selections