Skip to content

@editor

@editor <object>/<attribute>[=function|command]

The optional bundled softcode-editor package registers this command with @command and implements it entirely in softcode over @input. Install that package from the bundled package source first. The player must control the target. Existing FUNSYNTAX and CMDSYNTAX attributes select their own syntax; give =function or =command for a new or unflagged attribute.

Ordinary input appends one literal line. Nothing in a line is evaluated. A line beginning with .. inserts one leading dot, so ..s adds the source line .s. The editor commands are:

CommandAction
.sCheck syntax and save, remaining in the editor.
.sqCheck syntax, save, and quit.
.qQuit, when nothing is unsaved.
.q!Quit and discard unsaved changes.
.cCheck syntax without saving.
.lList the buffer with line numbers.
.uUndo the last appended line; a second .u puts it back.
.hShow the command summary.

A syntax error keeps the editor open and leaves the stored attribute unchanged; each error names its line and column, as .l numbers them. A best-effort conflict check also refuses a save when the attribute or its syntax flag changed after the editor opened it or last saved it. The editor stays open until one of its quit commands: when @input’s hour runs out it opens again with the draft as it was. @input/cancel remains the unconditional escape and saves nothing. Finish active editor sessions before upgrading, rolling back or uninstalling the package.

::: seealso