Golly Help: Edit Menu

Undo

Lets you undo one or more recent changes, including all editing changes and generating changes, as well as changes to the selection, rule, hashing state and layer name. The number of changes you can undo is limited only by available memory and disk space. Multiple changes made by a script are treated like a single change and will be undone all at once.

Each layer maintains its own undo/redo history (but cloned layers share the same undo/redo history). The current layer's undo/redo history is automatically cleared after creating a new pattern or opening a pattern file.

Redo

Lets you redo one or more recently undone changes. Note that the redo history is automatically cleared after you make a new change; i.e., if you do something like rotate the current selection, undo the rotation, then edit some cells or change the selection, you can no longer redo the rotation.

Disable Undo/Redo

If ticked then the Undo and Redo items are disabled, and any existing undo/redo history for the current layer is cleared. When editing or generating a very large pattern you may want to temporarily disable undo/redo to speed up some operations. But be careful using this feature — if you switch to another layer when this item is ticked then that layer's undo/redo history is also cleared.

Cut

Copies the pattern in the current selection to the clipboard (in RLE format) and then kills all cells in the selection.

Copy

Copies the pattern in the current selection to the clipboard. The clipboard data is in RLE format.

Clear

Kills all cells in the current selection.

Clear Outside

Kills all cells outside the current selection. This is often the quickest way to delete escaping gliders.

Paste

Pastes a pattern stored in the clipboard into the existing pattern. After selecting this item you'll be asked to click where you want the paste to occur. Before clicking you can use keyboard shortcuts to scroll, change scale, etc. The keyboard shortcuts normally used to flip/rotate the selection will instead modify the paste pattern. You can also type shift-M to change the paste mode or shift-L to change the paste location (see below). To cancel the paste, just click anywhere outside the view area or hit the escape key.

Settings in Preferences > Edit specify how to handle rule information in the clipboard pattern. You can tell Golly not to change the current rule, or only change the rule if the universe is empty, or always change to the given rule. Note that a rule change might cause the current algorithm to change.

The References section has links to a number of good sources for clipboard patterns.

If the clipboard text starts with "@RULE rulename" then Golly will save the text as rulename.rule in your rules folder (set in Preferences > Control) and switch to that rule.

Paste Mode

This submenu lets you choose the logical function used when pasting in a clipboard pattern. The choices are Copy, Or and Xor. Typing shift-M will cycle through all these modes, even after selecting the Paste command.

Paste Location

This submenu lets you choose the location of the cursor within the paste rectangle that appears after selecting the Paste command. You can choose any corner or the middle of the rectangle. Typing shift-L will cycle through all possible locations, even after selecting the Paste command.

Paste to Selection

Pastes a clipboard pattern into the current selection, but only if it will fit. The paste always occurs at the top left corner of the selection. This command can be used as a quick check to see if the pattern in the clipboard matches the pattern in the selection — if Xor paste mode is used then all the resulting cells will be dead if the patterns match.

Select All

Selects the entire pattern, assuming there are one or more live cells. If there are no live cells then any existing selection is removed.

Remove Selection

Removes the current selection (without changing any cell states).

Shrink Selection

Reduces the size of the current selection to the smallest rectangle containing all of the selection's live cells. You can hit "s" to shrink the selection and fit it in the current view.

Random Fill (n%)

Randomly fills the current selection with the indicated percentage of live cells. Use Preferences > Edit to change the percentage (from 1 to 100).

Flip Top-Bottom

The cells in the current selection are reflected about its central horizontal axis.

Flip Left-Right

The cells in the current selection are reflected about its central vertical axis.

Rotate Clockwise

The current selection is rotated 90 degrees clockwise about its center.

Rotate Anticlockwise

As above, but the rotation is anticlockwise.

Cursor Mode

This submenu lets you choose a cursor mode for various editing operations: drawing cells, picking cell states, selecting cells, moving the view, and zooming into or out from a clicked cell. There are other (quicker) ways to change the cursor mode:

- Click on the corresponding buttons in the edit bar.
- Hit the corresponding function keys (F2 to F7).
- Hit "c" to cycle through all the cursor modes.
- Press the shift key to temporarily toggle the draw/pick cursors or the zoom in/out cursors.