SED - Commands

SED  -  Commands

Top  Previous  Next

 

The command function is used to alter various long term states of the editor and to perform other actions. After entering the command function (Esc-X), a prompt for the command name is issued. The following commands are available:

 

BASICSaves the current record and runs the Basic compiler. This command is similar to COMPILE (described below) but it inserts marker lines into the source program where error or warning messages have been produced by the compiler.

 

BWORDSets Basic Word mode for search and replace functions as described for the forward search function.

 

CASE OFFSets Case Insensitive mode for search and replace functions.

 

CASE ONSets Case Sensitive mode for search and replace functions.

 

COMPILESaves the current record and runs the Basic compiler. For compatibility with SED on other platforms, if this record includes a line
*$CATALOG catname
the compiled program will be catalogued automatically after successful compilation. The actual cataloguing command issued is
CATALOG filename catname recordname
It is thus possible to perform either private or global cataloguing. The same action can be performed on QM using the $CATALOG compiler directive.

 

EXPAND.TABSExpands tab characters in the record being edited to align data on the columns determined by the current setting of the tab interval. The default tab columns are 11, 21, 31, etc.

 

FORMATApplies standard format rules to the layout of a QMBasic program.

 

FUNDAMENTALReverts to the default (fundamental mode) key bindings.

 

INDENTToggles indent mode.

 

KEYSDisplays the name of the active key binding record.

 

LNUMThe LNUM command controls display of line numbering. Used alone, it toggles the current state of numbering on the displayed buffer. It may also be used with the following qualifiers:
OFFTurn off line numbering in the current buffer.
ONTurn on line numbering in the current buffer.
ALLTurn on line numbering in all buffers.
OFF ALLTurn off line numbering in all buffers.
ON ALLSynonym for ALL.

 

LOAD.KEYSLoads a named key binding record.

 

OVERLAYToggles overlay mode. The OVERLAY function (Ctrl-O) has the same effect.

 

QUITEnds editing of the current record in a similar way to the quit key sequence but also aborts any select list.

 

READ.ONLYMakes the current buffer read-only, helping to avoid accidental updates.

 

RELEASEReleases the update lock on the current record.

 

RUNEntering RUN with no qualifying details runs the program in the current buffer (which must have been compiled). If RUN is followed by any qualifying details, the command is passed to the command processor for execution.

 

SAVE.KEYSSaves the key bindings as described later.

 

SPOOLSpools the contents of the current buffer to print unit zero.

 

The SPOOL command has optional qualifiers which may be used together if required. LNUM adds a line number prefix to each line printed. REGION prints only the lines between the mark and the cursor (which may be in either order). AT followed by a printer name selects the destination printer. NHEAD or NOHEAD suppresses the banner page.

 

TABSSets the tab interval to be used by the tab function and the EXPAND.TABS command. The value given after TABS must be in the range 1 to 99.

 

TRIMRemoves trailing spaces from all lines of the current buffer.

 

WORDSets Word mode for search and replace commands.

 

XEQ {cmnd}Executes QM command cmnd. The XEQ command prefix is only required where cmnd is also an internal SED command. All commands not recognised by SED are passed to the command processor for execution.

 

The command function maintains a stack of the last 100 commands executed. The up line and down line functions can be used to restore commands from the stack when the command prompt is displayed.