[prev] [up] [next]

Tips & Tricks on Editing

As you will spend most of your time in the editor, it is very helpful to know its capabilities. This document lists some of the less obvious features.

History of Copied Values

Of course you know how to copy-paste. But ocasionally, you want to paste a previouly copied text.
You get the paste history either by:

Inserting a Whole File

Under the "More" menu item, you'll find another "More" submenu (sorry for that stupid name). There, select the "Insert File Contents..." menu item.

Sorting a Range of Lines

Select the lines (triple-click, then hold and move the mouse). Then, select one of the sorting menu items in the "More"-"Tools"-"Sort" sub-submenu. Alternatively, select a bunch of words (double-click, then hold and move the mouse) and select the "Sort Words" item in the same menu.

Undo / Redo

The editors support unlimited undo (CTRL-z) and redo (CTRL-y).

Selecting Words, Lines, ...

Double click on a word to select it. Triple click to select a whole line. If you keep the mouse button pressed (i.e. double-click-and-hold), you can extent the selection word- or linewise. A quadruple click selects the whole text.

Double click on an opening or closing parenthesis, bracket or brace to select the surrounded text (including the brackets).

Press shift to extent an existing selection. Shift-click is even possible after you scrolled to another position in the text.

Moving the mouse out of the text area starts an automatic scroll operation. Move the mouse further out of the view to speed up the scroll speed.

Finding Text

If the text is already shown or under the cursor, simply select the text and press "Search Forward (F3 or ALT-f)". Similar, "ALT-b" searches backward.

If the text is not shown, press "CTRL-f" to get a textbox. Alternatively, find the "Search" item in the the "More" submenu.

Find and Replace

As with most Smalltalk editors, find and replace is done by repeating the previous edit operation:
  1. select some text (for example, a word, via double-click)
  2. type the replacement text
  3. press Again (F8) to search for the next string and replace again
You can also Repeat to the End using the "More"-"Again for All" menu function.

Find and Delete

The same procedure as above:
  1. select some text (for example, a word, via double-click)
  2. press Delete or Cut (Ctrl-x)
  3. press Again (F8) to search for the next string and delete again

Macros - Learn and Execute

A sequence of editing operations can be recorded (with Ctrl-F2 and replayed with ALT-F2. A typical use for that is when pasted text has to be converted into a literal array or similar, so that replace and insert have to be applied to a number of lines multiple times.
  1. position the text cursor somewhere before the text to be manipulated
  2. press Ctrl-F2 to start Learn Mode
  3. using cursor keys, edit shortcuts and regular text insertions, edit the line of text
  4. using cursor keys (and possibly SHIFT-Return), position the text cursor in front of the next line to be edited.
  5. press Ctrl-F2 to end Learn Mode
  6. press ALT-F2 to execute the macro again; possibly multiple times


Continue in "More Smalltalk".

[stx-logo]
Copyright © Claus Gittinger Development & Consulting
Copyright © eXept Software AG

<cg at exept.de>

Doc $Revision: 1.6 $ $Date: 2021/03/13 18:24:49 $