The ST editor supports up to two views. To split the window, double-click or drag the split symbol located on the vertical scroll bar. A double-click on the split bar closes the second view.
Highlight matching brackets
When you move the cursor next to a bracket, the corresponding opening or closing bracket is automatically highlighted.
Highlight matching keywords
When you move the cursor next to a keyword, a clause such as if..end_if
, while...end_while
is automatically highlighted.
Use the shortcut <Ctrl>+<E> or the corresponding toolbar button to go to the matching bracket or keyword.
Highlight references
Moving the cursor to a text automatically highlights references to the text. Only text matching the current context is highlighted. For example, variables with the same name from other contexts are ignored. If text is not highlighted, then it occurs only once in the editor.
Selected text automatically highlights references to the selected text. All texts containing the selected text will be highlighted, regardless of the text's current context.
Instead of using text search, click any variable to highlight all the occurrences in the editor.
The position of the highlighted text in the editor is displayed as rectangles on the vertical scroll bar.
Use the shortcuts <Ctrl>+<Shift>+<↑>, <Ctrl>+<Shift>+<¯> or the corresponding toolbar buttons to navigate through the highlighted text.
To help locating the highlighted text, the vertical scroll bar displays its positions in the editor. In addition, the vertical scroll bar shows the position of the currently active line where the main cursor is located.
Errors detected while entering text are indicated by red "squiggles" in the editor, e.g. when a variable is not declared.
Use multi-caret selection to make the same edit in two or more places at the same time. For example, you can insert the same text or modify existing text in multiple locations, or you can comment in/out several lines of code at the same time.
Block editing using the mouse
Press <Alt> while dragging the mouse to select the block to edit.
Block editing using the keyboard
Press <Alt>+<Shift>+<↑>/<¯>/<¬>/<®>/<Home>/<End> or click to select the block to edit.
Multi-caret editing
Press <Ctrl> and click where you want to add a caret or double-click where you want to add a selected text.
Press the arrow keys to move multi-carets.
Press <ESC> to remove multi-carets.
Several commands support multi-selections, for example delete, cut, copy, paste, auto completion, context menu commands for example to insert a variable into the Entry data monitor dialog.
Select complete lines of code, or a line fragment, and press one of the characters / ( [ ' to have the selection surrounded. If a piece of code has also been surrounded by comment characters, the comment characters will be removed.
Each change you make is highlighted with a color-coded bar in the left margin to indicate which lines have been changed.
The color orange indicates changed lines that are unsaved. |
|
The color green indicates changed lines that are saved. |
|
The color blue indicates lines that have been changed, then the changes have been undone so that the current lines are equal to the original lines, but this state has not been saved. |
|
The color green-yellow indicates lines that that have been changed, then some changes have been undone so that the current lines are different to the original lines, but this state has not been saved. |
When writing code, to indent an entire block of code without changing each line individually, simply select the block by pressing <Shift>+<¯> and press <Tab>. To unindent a block, press <Shift>+<Tab>. Lines are automatically indented to the indentation level of the previous line after inserting a semicolon. Lines inserted by the <Return> key are also indented.
You can choose to hide some code from view by clicking the minus sign in the column with the folding icons. You expand a collapsed region by clicking the plus sign. If you click the minus or the plus sign and simultaneously press <Ctrl> all elements of the block that can be folded will fold/unfold. Correspondingly, clicking the minus or plus sign and simultaneously pressing <Ctrl>+<Shift> affects all elements of the entire editor that can be folded.
The text of a collapsed region is shown in a tooltip when the mouse is moved over the [...] symbol at the end of the line.
Double-clicking the [...] symbol will expand the collapsed region.
Select any text where you want to change lowercase characters to uppercase characters or vice versa. Press <Ctrl>+<Shift>+<U> to convert the selection to UPPERCASE. Press <Ctrl>+<U> to convert the selection to lower case.