Selecting Text

You select text in a variety of ways, most of which should be familiar:

click-dragSelect the text over which you drag.
double-clickSelect the whole word under the cursor.
triple-clickSelect the whole line under the cursor.
shift-clickExtend the selection to the point where you click.
shift-left-arrowExtend the selection one character left.
shift-right-arrowExtend the selection one character right.
shift-up-arrowExtend the selection one line upward.
shift-down-arrowExtend the selection one line downward.
shift-homeExtend the selection to the left margin.
shift-endExtend the selection to the right margin.
shift-page upExtend the selection up one screen height.
shift-page-downExtend the selection down one screen height.
ctl-shift-left-arrowExtend the selection one word left.
ctl-shift-right-arrowExtend the selection one word right.
ctl-shift-up-arrowExtend the selection one paragraph upward.
ctl-shift-down-arrowExtend the selection one paragraph downward.
ctl-shift-homeExtend the selection to the top of file.
ctl-shift-endExtend the selection to the end of file.
ctl-a or Edit>Select AllSelect the entire file.
When you use a cursor-moving key (arrows, home/end, page up/down), any selection is cleared. To make a large selection with shift-click, use the scrollbar or Search>Jump to Line to find the target to click.

The current selection is described in the Selection field of the status bar. Double-click in that field to open the selection dialog:

You can use this dialog to specify the selection exactly using the keyboard. (Caution: if you use this dialog to set a selection in a part of the file that is not visible in the window, Guiguts does not scroll to show the selection. Use the scroll bars or Search>Jump to Line to bring the selection into view.)

If you hold the shift key while dragging, you create a columnar selection (see below). If, while you are shift-clicking to extend the selection, you drag the mouse even slightly, Guiguts takes it as a shift-drag and makes a columnar selection: the selection blinks from full-width to a narrow column. Without moving the mouse, shift-click more carefully; the selection is restored.

Type, Cut, Copy, Paste

To replace text, select it and begin typing. What you type replaces the selection. If there is no selection, what you type goes into the document at the insertion point.

The familiar Cut, Copy, and Paste operations are available in the Edit menu and using the ctl-c, ctl-x, and ctl-v keys (control-key on all platforms including Mac).

Click the Insert/Overtype button in the status bar to switch between the usual insert mode (each keystroke or pasted letter is inserted into the document and text moves right to make room), and overtype mode. In overtype mode, each keystroke or pasted letter replaces the character at the insertion point.

Copy and Paste Between Documents and Programs

To copy text between documents, Copy in the first, use File>Open to open the second, and Paste. You can copy and paste between Guiguts and other applications. In Windows and Linux there is no special limit on the amount of text you can copy in Guiguts and paste into another application's window, or vice versa.

In Mac OS X, you can copy any amount of text in a Mac OS X application such as TextEdit and paste it into the Guiguts window. (The only difficulty is in remembering to use command-c in TextEdit but control-v in Guiguts.) However, Apple's X-windows puts a limit of approximately 4,000 bytes on the amount of text you can copy in Guiguts and paste into a Mac application. If you have copied more than 4,000 characters, nothing is pasted.

Undo and Redo

Guiguts supports multiple levels of Undo. It keeps a log of recent editing operations. Apply Edit>Undo, control-z, or click in the toolbar to undo actions from the most recent one back.

The Undo log is cleared when the file is saved using either File>Save or File>Save As, and when a file is opened. To Undo every change since the file was last saved, just re-open it.

Most operations that are performed with a single click or command are undone with a single Undo. This is not true of all operations; for example when you click Replace All in the Search dialog, each of what may have been many replacements is undone as a separate action. Watch the file carefully while applying undo and stop when it is in the state you want.

It is possible to undo a Rewrap operation of a small selection, but it is not advisable. Currently, page markers in the rewrapped text do not always return to their original positions when rewrap is undone. Instead of undoing a rewrap, select the text and wrap it again to the correct margins.

Generally you can Redo anything you Undo by applying Edit>Redo, control-y, or clicking in the toolbar. Each Redo reverses the effect of one Undo. Another way to get the effect of Redo is to make a new, small change (for example, type space-backspace). Then begin clicking Undo: after undoing your new change, Undo will continue to Undo each Undo that preceded the change. The Undo of an Undo is logically equivalent to Redo, but uses a different path that may be more reliable than Redo.

Selecting and Using Columns

Guiguts allows you to select a column of text and copy it, paste it, fill it, or move it horizontally. Columnar selections are supported mainly to help you work with ASCII tables. Columnar selections are not consistently integrated with the rest of the editing facilities and you can get odd results when using them in ways not explicitly intended.

To select a column, first clear any other selection by clicking in the text or pressing an arrow key. Then hold down either shift key and drag diagonally to select a rectangle of text. The selection field in the status bar shows the size of the selection; click in that field if necessary to make it show Row and Column sizes.

You cannot extend a columnar selection by shift-clicking; to change its size you must start over with a new selection.

With a columnar selection active you can fill the selection with flood-fill, and you can shift the selection left or right with the shift commands in the Selection menu.

Copy, Cut, and Paste of columnar data are primarily controlled with the F1, F2, and F3 keys respectively, or with the Edit menu.

Use F2, Edit>Cut or control-x to delete a columnar selection and put it on the clipboard. Use F1, Edit>Copy or control-c to copy the text to the clipboard.

Use F3 or Edit>Col Paste to paste columnar data as a column. There should be no current selection when pasting. The column is inserted, row by row, with its upper-left corner at the insertion point. When the Typeover mode button in the status bar is set to Insert, the columnar patch is inserted, causing existing characters to shift to the right. When the Typeover mode is Overstrike, the columnar data overwrites existing text.

If a selection is active when you paste a column with F3, the operation will combine with the selection in ways that are hard to predict and rarely useful. If you use control-v to paste the text of a column, it is not pasted as a column, but as if it were a small paragraph composed of short lines.

Modifying with the Selection Menu

The Selection menu offers the following functions for changing the selected text. The Rewrap operations are discussed on this page. Other functions are expanded below.

lowercase selectionForce all letters to lowercase.
Sentence case selectionCapitalize the initial letter, lowercase all others.
Title Case SelectionCapitalize all initial letters.
UPPERCASE SelectionForce all letters to uppercase.
Surround Selection With...Encloses selection in chosen strings.
Flood Fill Selection With...Fills the selection with a chosen letter or string.
Indent Selection 1Moves all the selection one byte right.
Indent Selection -1Moves all the selection one byte left.
Rewrap SelectionWraps the selected text to the rewrap margins, see this page.
Block Rewrap SelectionWraps the selected text to the block rewrap margins, see this page
ASCII BoxesFrame the selection in a box made of + | - characters.
Align text on a stringAlign columnar text on decimal point, etc.
Convert To Named/Numeric EntitiesSpecial characters to &xxx; form.
Convert From Named/Numeric Entities&xxx; to special characters.
Convert Fractions"1/4" to ¼, etc.

Surround Selection

The Surround Selection With... function opens a dialog box asking for the strings that are to enclose the selection:

When you click OK, the string from the first field is inserted at the head of the selection; that from the second, at the end. You can enter any strings, for example HTML markup like '<p class="foo">' and '</p>.' The Surround box remains on the screen until you close it. You can repeatedly select a target, click OK, and select again. In this way you can enter repetitive markup such as '<td>...</td>' rapidly.

When used with a columnar selection, Surround Selection inserts the strings at the ends of each row of the column. Thus you could use it, for example, to put stiles ("|") down each side of an ASCII table.

Flood Fill

The Flood Selection With... function opens a dialog box asking for a string to use in filling the selection:
When you click OK, the entire selection is filled with repeats of that string. This is a convenient way to fill an area with spaces or fill a line with dashes. The box remains on the screen until you close it. You can repeatedly select a target, click OK, and select again, to rapidly fill many areas.

Even when the Flood Fill dialog is not visible, keying ctl-w invokes this function using the last-entered string, so you can use select, ctl-w to fill a space at any time. (However, if you hit ctl-w accidentally, you may be surprised when your selection is suddenly blanked.)

Flood fill works with a columnar selection, so you can use it, for example, to blank the center of a boxed table cell.

Shifting Left and Right

Indent by 1 shifts the selection right by inserting spaces at the left margin. Indent by -1 shifts the selection left by removing one space from the left margin of every line that has a space—lines that are already flush to the margin are not moved.

The shift functions are also available from the Windows keyboard as alt-left-arrow and alt-right-arrow. (Not available in Linux or Mac.)

These functions restore the selection so you can immediately click on the functions again. If you tear off the Selection Menu, you can shift a selection multiple spaces quickly by clicking repeatedly on the function.

The Indent functions work with a columnar selection, so you can use them to reposition the contents of a table cell.

Aligning Columns of Figures

The Align Text on String opens a dialog for you to specify some character such as a decimal point or currency symbol. When you click OK, Guiguts moves the lines in the selection left or right so that the first occurrence of that symbol in each line is vertically aligned. For example, this text:
$10.20      
$1,024.65 
$244.86      
when aligned on the decimal point, changes to:
   $10.20      
$1,024.65 
  $244.86      
The Align function does not operate with a columnar selection, so cannot be used to adjust a column in a table cell.

Converting Named Entities and Fractions

The final three items in the Selection menu are used to convert between special characters and named HTML entities.

In an ASCII etext you may use characters from the Latin-1 set (see the Latin-1 palette opened from the Help menu) such as the sterling symbol £ or fractions ½. You may also use Unicode characters, such as ă (a-breve).

It is possible to retain these in the HTML etext, but not advisable; it is preferable that the HTML etext be plain ASCII (see this page). You convert special symbols to plain ASCII by coding them as named or numeric "entities," for example, coding £ as &pound;, ½ as &frac12;, ă as &#259;, etc.

To convert all non-ASCII symbols in a block of text to named entities, select the text and use Selection>Convert To Named/Numeric Entities.

To convert an expanded fraction such as "1/4" to a named entity, select the string "1/4" and apply Convert Fractions. The string is replaced with the named entity &frac14;. If you really want the Latin-1 symbol ¼, re-select the named entity and apply Convert From Named/Numeric Entities. By this two-step process you can go from "1/4" to "¼".