PPTools/Guiguts/Guiguts Manual/Edit Menu

From DPWiki
Jump to navigation Jump to search


GUIGUTS VERSION 1.4.0 MANUAL

Selecting and Moving Text, Editing, and the Edit Menu

Selecting Text

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

click-drag Select the text over which you drag.
double-click Select the whole word under the cursor.
triple-click Select the whole line under the cursor.
shift-click Extend the selection to the point where you click.
shift-left-arrow Extend the selection one character left.
shift-right-arrow Extend the selection one character right.
shift-up-arrow Extend the selection one line upward.
shift-down-arrow Extend the selection one line downward.
shift-home Extend the selection to the left margin.
shift-end Extend the selection to the right margin.
shift-page up Extend the selection up one screen height.
shift-page-down Extend the selection down one screen height.
ctrl-shift-left-arrow Extend the selection one word left.
ctrl-shift-right-arrow Extend the selection one word right.
ctrl-shift-up-arrow Extend the selection one paragraph upward.
ctrl-shift-down-arrow Extend the selection one paragraph downward.
ctrl-shift-home Extend the selection to the top of file.
ctrl-shift-end Extend the selection to the end of file.
ctrl-a or Edit>Select All Select the entire file.
Also see Selecting Columns

When you use a cursor-moving key (arrows, home/end, page up/down), any selection is cleared. If you want to use shift-click to make a selection larger than the screen display, use the scrollbar or Search>Jump to Line to find the target to click.

If you lose a selection, for example by inadvertently using an arrow key, you can reselect the same area by right-clicking (Mac: ctl-clicking) the Selection field in the status bar.

If you hold the shift key while dragging, you create a columnar selection (discussed below). If, while you are shift-clicking to extend a normal 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 normal selection is restored.


The Edit Menu

Gg1.2-08a-editmenu.png


Undo and Redo

Guiguts supports multiple levels of Undo. It keeps a log of recent editing operations. Apply Edit>Undo, ctrl-z, or click Guiguts Tb-undo.png 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 without saving.

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 a separate undo 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, ctrl-y, or clicking Guiguts Tb-redo.png 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.


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 the standard keyboard shortcuts: ctrl+c, ctrl+x, and ctrl+v. Guiguts also offers Alternative Paste (shortcut key: ctrl+alt+v) for use when a normal Paste doesn't work (usually when trying to paste Greek or certain other Unicode characters from an external source). When normal Paste doesn't work properly, just Undo it (ctrl+z) and use ctrl+alt+v.

Gg-1.3.2-08c-right-click.png

You can right-click within the main window to pop-up a small menu offering Cut, Copy, Paste, and access to Guiguts' Bookmarks menu. Guiguts will move the cursor to where you clicked so that you can paste whatever is on the clipboard. If you choose Cut or Copy, that action will be performed on the currently-highlighted text.

Click the Insert/Overtype button in the status bar to switch between the usual insert mode, in which 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, select and copy what you need from the first document, then use File>Open to open the second document, which also closes the first document. (If you are using Windows, you can open the second document in a second copy of Guiguts while keeping the first document open.) Then, paste the copied text where you need it in the second document.

As the previous section explained, pasting certain Unicode characters from an external source (including another Guiguts window) may not work properly, resulting in some wrong and unexpected characters in the pasted text. If that happens, try using Undo (ctrl+z) and then Alternative Paste (ctrl+alt+v) and check the results.

You can copy and paste between Guiguts and other applications, including another copy of Guiguts. In Windows and Linux there is no particular limit on the amount of text you can copy in Guiguts and paste into another application's window, or vice versa.

On a Mac, you can copy or paste no more than about 4,000 characters at a time when using Guiguts due to a limitation with XQuartz. If you try to copy more than about 4,000 characters, results are unpredictable and Guiguts may fail. (This information is current as of July, 2020.)

Note: Certain kinds of Cuts in Guiguts, and several kinds of Paste from another program (including another copy of Guiguts) into Guiguts, can disrupt some of the pointers (page markers) in the associated .bin file (see File>Page Markers and the Metadata File and File>Project>Display/Adjust Page Markers. Readjusting those markers can be difficult. If it does happen, the later, the better. If you are using visible page numbers in the HTML version of your project and the page markers are disrupted after you use HTML>HTML Generator>AutoGenerate HTML, those visible page numbers will remain valid, so the disruption only will mean that, when you try to display the page image corresponding to the text, you may see the wrong image. The same inconvenience can occur while preparing the Plain Text version, but it will not affect what the reader sees later on. However, if the .bin file pointers become incorrect before AutoGenerate HTML, some of the visible page numbers (if you are using them) also may be incorrect. You can edit and correct the HTML tag text within Guiguts, even though doing so will not correct the .bin file markers. Similarly, using File>Project>Display/Adjust Page Markers after AutoGenerate HTML will not correct the visible page numbers, even though it may let you see the page images that correspond to the on-screen text.

Selecting 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 a 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.

Gg1.0-08b-select column.png

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 cut, copy, and paste it, shift the selection left or right with the shift commands in the Txt menu, or fill the selection with flood-fill.

Copy, Cut, and Paste of columnar data are primarily controlled with the Function keys F1, F2, and F3 respectively, or with the Edit menu. Use F2 or Edit>Column Cut or ctrl-x to delete a columnar selection and put it on the clipboard. Use F1 or Edit>Column Copy or ctrl-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 you use ctrl-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. 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.

These Column operations can be very useful, but you should check the results immediately, and use Undo (Guiguts Tb-undo.png or ctrl-z) when they don't produce the expected results.


Select All

This selects all of the text in the document. The standard shortcut, ctrl-a, also does this.

Selection Dialog

Double-click in the selection field in the status bar to open a selection dialog:

Guiguts sel dialog.png

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.)


Unselect All

Unselects whatever you've just selected. Pressing the Esc key does the same thing.

Change Case

These four options change the upper/lower-case of the letters within the selection:

  • lowercase (ctrl-l as in 'EL'): makes all of the letters lowercase;
  • Sentence case: capitalizes the first letter of the selection and makes the others lowercase;
  • Title Case (ctrl-t): makes the first letter of most words uppercase and the others lowercase; articles (e.g., 'a', 'the') and some prepositions are made lowercase;
  • UPPERCASE (ctrl-u): makes all of the letters uppercase.


Surround Selection

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

Guiguts Surround.png

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:

Guiguts Flood.png

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 ctrl-w invokes this function using the last-entered string, so you can use select then ctrl-w to fill a space at any time. (However, if you hit ctrl-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.