Using the Editor Commands
This section describes all the editor commands. The following terminology is used in the descriptions:
An item enclosed in square brackets [. . .] is optional.
An item enclosed in single quotes '. . .' means the string you type must be enclosed in single quotes.
An item in italics is a generic description of the item to be typed. For example, the command:
$marker
means that you must type a numeric value for marker, such as 2.
As another example, the command to load a file is:
L 'filename'
This means you must type the name of a file (in single quotes) after the L. So, if the file to be loaded is cad_mac.m, you must type:
L 'cad_mac.m'
The current line is the line containing the cursor.
The next table shows the full set of editor commands. Before typing any editor command, you must type $. The cursor moves to the bottom of the screen with the symbol $ in front of it. Remember that $ is the default escape character.
Command
Effect of Command
 
marker
Moves the cursor to the line containing the specified marker. For example, entering $ 4 moves the cursor to the line containing marker number 4.
 
'string'
Moves the cursor to the next occurrence of the specified string. For example, entering $ 'SolidDesigner' moves the cursor to the next occurrence of the string SolidDesigner.
 
? ['keyword']
This displays the system help file at the section describing the keyword. If you enter ? without a keyword, the section explaining the screen editor is displayed. To return to your file press [Ctrl] [D].
 
AC
Adjust Center. For each line of a paragraph, this command centralizes the text between the margins.
 
AF
Adjust Fill. This command flows a paragraph between the margins. The left edge is justified and the right edge is ragged.
 
AJ
Adjust Justify. This command flows a paragraph between the margins. Left and right edges are justified. This means that the spacing between words will vary.
* 
Do not use AF or AJ to edit macros as each line will be joined to the end of the previous line. These commands should be used only for editing text.
Command
Effect of Command
 
C marker1 marker2
Copy. Copies all text lines between the current line and marker1 (inclusive) and inserts them after marker2. For example, entering $C34 will copy all the text between the current line and marker 3 and insert it after marker 4.
 
D marker
Delete. Deletes all text lines between the current line and the marker (inclusive).
H ['keyword']
Help. This is the same as the ? command.
 
L 'filename'
Load. Copies all text lines from the specified file and inserts them after the current line. For example, entering $L 'cad_macros' will load the file cad_macros after the current line.
 
M marker1 marker2
Move. Moves all text lines between the current line and marker1 (inclusive) and inserts them after marker2. Source and destination must not overlap. For example, entering $M67 will move all text between the current line and marker 6 and place the text after marker 7.
 
N
Next. Repeats the last string search.
 
O 'filename' [marker]
Overwrite. Copies all text lines between the current line and the marker (inclusive), and writes them to a file with the specified name. If no marker is specified, the cursor position is ignored and the whole file is copied. Any existing file with the specified name is overwritten. For example, entering $O 'cad_macros' ! will copy the text between the current line and the last line (inclusive) into a file called cad_macros. If you omit the !, the whole file is copied.
Command
Effect of Command
 
R [V] ['string1'] ['string2'] [marker]
Replace. Replaces all occurrences of string1 with string2 between the current line and the marker (inclusive). The V lets you verify each change of string. If you omit the marker, only one replacement is made. If either string is omitted, the default is taken as the corresponding last-used string. For example, if you enter
$RV 'black' 'white' !
the cursor moves to the next occurrence of black. You then have the option of replacing it by white, or moving to the next occurrence of black:
R replaces,
' ' does not replace,
S aborts.
Pressing R replaces the black by white. Pressing the space bar moves to the next occurrence of the black. Pressing S aborts the operation.
 
SE 'character'
Set Escape. Redefines the escape character. This character causes the cursor to jump from your file to the editor command line. The default escape character is $.
You can use any character except 0 ... 9, A ... Z, a ... z, ... ! and ?. A new escape character remains in force until redefined or until the system is switched off.
If you wish to define the escape character as #, enter
$ SE '#'
 
SL
Set Left margin. Sets the left margin to the current cursor position.
 
SM n
Set Marker. Sets the marker specified at the current line. n can have any value from 0 through 9. The space between SM and n is optional. For example, entering $ SM7 sets the marker 7 at the current line.
Command
Effect of Command
 
SR
Set Right margin. Sets the right margin to the current cursor position.
 
W 'filename' [marker]
Write. Copies all text lines between the current line and the marker (inclusive) and writes them to a file with the specified name. If no marker is specified then the whole file is copied. If a file with that name already exists then the operation is aborted. For example, to copy the text between the current line and marker 6 to a file called cad_macros, enter the following:
$ W 'cad_macros' 6
* 
SL, SM and SR will not adjust the text until you use AF or AJ. Remember that AF and AJ are not normally used with macros.
Was this helpful?