Code editor

The code editor is a syntax-highlighting text editor that is built into Strange Eons. It is used to edit a number of text-based resource file types that are used in projects and plug-ins, including script code, HTML, settings files, and more. Plug-in developers can also extend the editor to support other file types.

A code editor window

Features

Abbreviations

Abbreviations are short letter patterns you type in and then expand into longer text sequences by typing Tab. For example, in script code files you can type fn Tab to insert the skeleton of a new function definition. The available abbreviations match the type of file you are editing, and you can add new abbreviations of your own.

To edit the abbreviations used in the code editor, choose Source/Abbreviations.

Depending on the type of file, a navigator panel may appear to the left of the text editing area. This panel allows you to jump between logical sections of the file by clicking one of the entries in the list. The meaning of logical sections depends on the type of file.

To jump to a destination listed in the navigator panel, click on the panel entry.

To show or hide the navigator panel in supported file types, choose View/Navigator.

To resize the navigator panel, drag the bar between the panel and the text editing area.

Interacting with project files

To insert the path to a resource file into a code editor, drag and drop the file from the project pane to the desired insertion point.

To add or increase the number of copies of a component in a deck, drag and drop the component from the project pane into a copies file.

To interactively edit a region in a settings file, select the region with the Draw Regions tool open.

Jumping to error locations

When a runtime error occurs in a script, a stack trace is often printed to the script output window. This shows the script file and line number that was being executed when the error occurred.

To jump to the location of a stack trace entry in the code editor, left click the stack trace line in the script output window.

Commands

This table lists editing commands available from the code editor. These also generally work anywhere you see a code editing panel, such as the Quickscript dialog.

Command Gesture
Movement  
Move to previous/next character Left/Right
Move to previous/next line Up/Down
Move to previous/next word Ctrl + Left/Right
Move to start/end of line Home/End
Move to up/down one window Page Up/Page Down
Move to start/end of file Ctrl + Home/End
Jump to line n Ctrl + G, n, Enter
Selection  
Extend the selection Shift + any movement command
Select all (entire file) Ctrl + A
Toggle rectangular selection Ctrl + \
Editing  
Delete previous/next word  
Move line(s) up/down Ctrl + Shift + Up/Down
Cut selection to clipboard Ctrl + X
Swap selection with clipboard Ctrl + Shift + X
Copy selection to clipboard Ctrl + C
Paste text from clipboard Ctrl + V
Paste as rectangle Ctrl + Shift + V
Insert new line without breaking current line Shift + Enter
Insert new line without indenting Alt + Enter
Undo previous edit Ctrl + Z
Redo most recent undo Ctrl + Y
Code and text formatting  
Run script F5
Debug script F3
Indent/unindent slected lines Tab/Shift + Tab
Comment out/uncomment slected lines Ctrl + //Ctrl + Shift + /
Transform to upper case Ctrl + Shift + U
Transform to lower case Ctrl + Shift + L
Trim extra space from line ends Source|Remove Trailing Spaces
Sort selected lines Source|Sort
Expand abbreviation Type abbreviation code, then Tab
Complete script code (experimental) Ctrl + Space
Most Markup commands also work  
Automation  
Repeat next key stroke n times Ctrl + Enter, n, key stroke
Start recording key strokes F9
Stop recording key strokes F10
Play most recent recording F6

Automation examples

To select the next 10 lines, type Home, Ctrl + Enter, 1, 0, Down.

To play the most recently recorded macro 25 times, type Ctrl + Enter, 2, 5, F6.