By default, selections in AceText behave like in most other Windows applications. When you move the text cursor, by pressing a key on the keyboard or clicking somewhere with the mouse, the selection disappears. When you enter some text or paste from the clipboard, the selected text is replaced by the text you entered or pasted. Pressing the Backspace or Delete key deletes the selection.
You can turn on Persistent Selections in the Options menu or via the corresponding button on the main toolbar. If you do so then moving the text cursor does not cause the selection to disappear. Also, entering or pasting text does not delete the selected text. The typed or pasted text is inserted at the position of the text cursor, whether that is inside or outside of the selection. If it is inside the selection, the selection is expanded to include both the text originally selected and the newly entered text.
Pressing the Backspace or Delete key does not delete a persistent selection. It only deletes one character to the left or right of the cursor. Press Ctrl+Delete to delete a persistent selection.
If you use the Word Wrap button to turn off word wrap and select a monospaced left-to-right text layout as the default text layout in the Appearance Preferences then you can make rectangular selections within the body text of your clips. These settings ensure that the characters in your text line up neatly in columns. The clip itself does not need to be of the “rectangular text block” kind. It will work with any clip kind other than “binary data”. With word wrap off and a monospaced text layout, you can make a rectangular selection by holding down the Alt key while making a selection like you normally do with the keyboard or the mouse.
Making a rectangular selection automatically puts AceText into column editing mode while the cursor is at the left- or right-hand edge of the selection. Column editing often results in a new rectangular selection that is zero columns wide. Such a zero-column selection appears as a vertical line between two columns. You can think of it as a multi-line text cursor. You can make such a selection simply by creating a rectangular selection that starts and ends on the same column on different lines.
Column editing works differently depending on whether selections are persistent.
When selections are not persistent, the cursor is always at an edge of the selection. Moving the cursor away from the selection removes the selection. So column editing is always active if there is a non-persistent rectangular selection.
Entering a character on the keyboard replaces the selected columns with that character on each line. You get a new zero-column selection after the entered character on each line. Entering a character on a zero-column selection inserts the character at the selected column on each line and shifts the zero-column selection one column to the right. Combined, entering multiple characters replaces the selected columns with those characters on each line.
When one or more columns are selected, pressing Backspace or Delete on the keyboard deletes the selected columns. It doesn’t matter whether the cursor is at the left- or right-hand edge. The selection itself remains where it is but becomes zero columns wide.
Pressing Backspace on a zero-column selection deletes the character to the left of the selection on each selected line. The selection moves one column to the left along with the cursor. Pressing Delete on a zero-column selection deletes the character to the right of the selection on each selected line. The selection stays where it is.
Pasting text that does not contain any line breaks replaces the selected columns with the pasted text on each line. You get a new zero-column selection after the pasted text on each line. Pasting text without line breaks on a zero-column selection inserts the pasted text on each line and shifts the zero-column selection as many columns to the right as were pasted.
Copying a rectangular selection and pasting it over another rectangular selection deletes all the selected columns. The pasted rectangle is then inserted at what was the left-hand edge of the deleted selection. The first line on the clipboard is inserted into the first selected line, the second line on the clipboard into the second selected line, and so on. Nothing is selected after pasting. If there are fewer lines on the clipboard than were selected then the whole selection is still deleted. Nothing is inserted on the extra lines that were selected. If there are more lines on the clipboard than were selected, those lines are inserted at the same column into the lines below the selection. If there are not enough lines in the file below the selection then as many lines are added as needed. They are padded with spaces until the column that you are pasting at.
Copying a linear selection and pasting it over a rectangular selection deletes all the selected columns. All of the pasted text, including its line breaks, is then inserted at what was the upper left corner of the deleted selection. Nothing is inserted on the second and following lines that columns were deleted from.
So, by turning off persistent selections, you can easily replace or fill a rectangular selection with new text.
When selections are persistent, moving the cursor away from the edge of the selection cancels column editing without removing the selection. Column editing becomes active again as soon as you move the cursor back to the edge of the selection. Any edits you make while the cursor is not at the selection’s edge are made only at the position of the cursor, whether that is inside or outside the selection.
Entering a character on the keyboard inserts that character on each selected line at the column that the text cursor is on. You get a new zero-column selection after the entered character on each line. Nothing is deleted.
Pressing Backspace deletes the character to the left of the cursor’s column on each selected line. Pressing Delete deletes the character to the right of the cursor’s column on each selected line. If the deleted column was selected, the selection shrinks by one column. If the deleted column was to the left of the selection, the selection shifts one column to the left. Regardless, the cursor stays at the same edge of the selection.
Pasting text that does not contain any line breaks inserts the pasted text at the cursor’s column on each selected line. You get a new rectangular selection of the pasted text on each line it was pasted into.
Pasting text that does contain line breaks clears and ignores any persistent selection and is thus unaffected by column editing. Pasting a linear block simply inserts all its text at the cursor’s position.
Pasting a rectangular block inserts the first pasted line at the cursor, the second line at the cursor’s column on the line below the cursor, and so on. If the cursor was at the bottom of a rectangular selection then the second and following lines are pasted below the selection. If there are not enough lines in the file below the cursor to paste all the lines on the clipboard then additional lines are added to the file. They are padded with spaces until the cursor’s column.
So, by turning on persistent selections, you can easily prefix or suffix a rectangular selection with new text.