home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.update.uu.se
/
ftp.update.uu.se.2014.03.zip
/
ftp.update.uu.se
/
pub
/
rainbow
/
msdos
/
misc
/
sedtfile.lzh
/
SEDTADV.EDT
< prev
next >
Wrap
Text File
|
1986-01-04
|
47KB
|
1,057 lines
SEDT advanced guide, Version 2.1
Introduction
Introduction
This document is a sequel to "An introductory guide to
the SEDT text editor," which should be studied first. It
completes the description of SEDT's built-in functions and
explains how to customize the editor by changing the definitions
of the keys. This guide has been written for Digital keyboards.
If you have an IBM PC or IBM AT keyboard refer to appendix A for
a translation from Digital to IBM keys.
SEDT advanced guide, Version 2.1
Command-line arguments
Command-line arguments
When you activated SEDT, you can give it certain extra
instructions by adding to the command line. If you supply a
second file specification, thus:
SEDT B:FROGS.TXT B:NEWFROGS.TXT
SEDT loads up the editing buffer from the first-named
file, but makes the second-named file the default output file.
There are also some hyphen-plus-single-letter switches, any or
all of which can be appended at the end of the SEDT command: -J
disables the generation of a journal file (thus making SEDT
faster but less reliable); -E causes a control-Z character to be
appended to a file when it is written out to a disk; -B disables
the generation of a .BAK file when an edited file is written out
with the same name as an existing file (beware -- if you disable
backup and you don't have enough disk space to hold the new
version, you wind up with no version). -R ensures that the last
line of any file saved from SEDT is terminated with a <RETURN>.
-D informs SEDT that it is being run on an IBM PC or compatible
using a Digital keyboard.
It is also possible to invoke SEDT with no arguments, in
which case you will have to select an output file once you get
into the program, using the <GOLD> <S> command.
SEDT advanced guide, Version 2.1
Initialization files and journal files
Initialization files and journal files
When SEDT is activated, it looks for a file SEDTCOM.TXT,
first in SEDT's master directory, or SEDT$COMMANDS under VAX/VMS,
containing a script of SEDT command sequences. If the file is
found, the basic commands are executed during initialization.
(See below for an explanation of SEDT's basic commands.)
SEDT also looks for a file with the same filename proper
as the one being edited, but the filetype .JOU. If this file is
found, SEDT will submit the keystrokes it records as if they came
from the keyboard, thus reconstructing the editing session that
was interrupted. (One important limitation: Journal files do
not record movements of data from one window to another;
windowing operations are ignored during recovery.)
The entire sequence of initialization operations that
SEDT goes through can be summarized as follows:
1. Load the input file into buffer 0; if the specified
input file is not found in the current directory, display
a warning message and start with buffer 0 empty.
2. Recover the key definitions from MS/DOS, CP/M:
SEDTKEYS.TXT in SEDT's master directory; VMS:
SEDT$KEYS; abort if this file is not found.
3. Recover the ruler from MS/DOS, CP/M: RULER0.TXT in
SEDT's master directory; VMS: SEDT$LIBRARY:RULER0.TXT;
if this file is not found, display a warning message and
set up a default ruler.
4. If the user has supplied a line number in the MS-DOS
command that activates SEDT, move the cursor to that
line.
5. Look for a script in CP/M, MS/DOS: SEDTCOM.TXT in
SEDT's master directory; VMS: SEDT$COMMANDS and execute
the instructions in it if it is found.
6. Look for a .JOU file with the same filename as the
input file and reproduce the effect of the keystrokes
recorded in it if it is found.
SEDT advanced guide, Version 2.1
Command structure
Command structure
As noted in the introductory document, a command can be
preceded by a repetition factor, indicating how many times it is
to be done. In addition, with any direction-dependent command,
it is possible to override the default direction of motion by
typing <GOLD> <+> or <GOLD> <>> (for forward motion), or <GOLD>
<-> or <GOLD> <<> (for backward motion), before the command.
Such a prefix should precede the repetition-factor prefix if both
are used, and replaces the initial <GOLD> of the
repetition-factor prefix.
When you are responding to a prompt from SEDT, you can
edit your response by pressing the boxed X key to delete the
previous character, the left and right arrow keys to move the
cursor back and forth so that additional characters can be
inserted, and <CTRL/U> to discard the entire response.
SEDT advanced guide, Version 2.1
Additional cursor movement commands
Additional cursor movement commands
On the 23'd display line, at the start, SEDT indicates a
direction of cursor movement (either "Forward" or "Reverse").
This directional indication applies to a group of cursor movement
commands that were not mentioned in the introductory guide:
Move one character
.
Keypad key <3> shifts the cursor one character in
the current direction of cursor movement. (It is
therefore equivalent to the right arrow if the current
direction is "Forward," to the left arrow if it is
"Reverse.")
Move to next beginning of word
.
Keypad key <1> shifts the cursor to the next
point in the current direction of cursor movement at
which a word begins.
Move to next beginning of line
.
Keypad key <0> shifts the cursor to the next
point in the current direction of cursor movement at
which a line begins.
Move to next end of line
.
Keypad key <2> shifts the cursor to the next
point in the current direction of cursor movement at
which a line ends.
Move to next beginning of paragraph
.
Keypad key <8> shifts the cursor to the next
point in the current direction of cursor movement at
which a paragraph begins.
Move to next page break
.
Keypad key <7> shifts the cursor to the next page
break in the current direction of cursor movement, or to
the beginning or end of the file if no page break
isencountered. (The way to insert a page break into a
text you are editing is to press <GOLD> <P>.)
SEDT advanced guide, Version 2.1
Additional cursor movement commands
The direction of motion also affects the behavior of the
"Search for specific string" operation described in the
introductory guide. If the current direction is Forward, the
"Search for specific string" operation searches from the current
cursor position towards the end of the buffer; if it is Reverse,
however, the search proceeds from the current cursor position
backwards towards the beginning of the file.
When SEDT is initially entered, the default direction of
motion is Forward. The "Back up" command (keypad key <5>)
switches it to Reverse; the "Advance" command (keypad key <4>)
restores the Forward direction of motion. Many experienced users
always preserve the Forward direction, moving backwards when
necessary by pressing <5>, giving the necessary cursor-movement
commands, and then pressing <4>.
Two other cursor-movement operations are independent of
the direction of motion:
Move to previous beginning of line
.
The <BS> key, also marked <F12>, the second from
the left in the third group of gray keys across the top
of the keyboard, moves the cursor to the beginning of the
line on which it is placed, or, if it is already at the
beginning of a line, to the beginning of the previous
line. (Thus it works like the Reverse version of the
"Move to next beginning of line" command, but does not
presuppose the Reverse direction of motion.)
Mark position
.
<GOLD> <M> ("Mark") causes SEDT to remember the
position in the text that is occupied by the cursor at
the time the command is entered. Subsequently one can
return to that position by pressing <GOLD>, followed by
the <.> key on the ordinary typewriter keyboard (NOTE:
NOT THE NUMERIC KEYPAD). Actually up to ten positions in
the text can be marked independently; the sequence
<GOLD>, number, <GOLD>, <M>, where "number" is any
decimal number from 1 to 10, will set a mark, and the
sequence <GOLD>, number, <GOLD>, <.> will go to that
mark. The mark that is used by default in the plain
vanilla <GOLD> <M> is mark #1.
Finally, SEDT recognizes certain synonyms for familiar
commands. <GOLD> <B> and <GOLD> <down arrow> are synonyms for
<GOLD> <4>; either of them moves the cursor to the end of the
buffer. Similarly, <GOLD> <T> and <GOLD> <up arrow> are synonyms
for <GOLD> <5>.
SEDT advanced guide, Version 2.1
File-management and buffer-management commands
File-management and buffer-management commands
SEDT permits the user to manipulate several files of text
simultaneously and to switch from one file to another without
exiting from the program. Specifically, SEDT maintains four
independent "main" text buffers, numbered from 0 to 3. When the
program is initially activated, the user is placed in buffer 0;
however, one can move into any of the four buffers by pressing
the correct function key in the rightmost group of gray keys at
the top of the keyboard:
<F17> -- buffer 0
<F18> -- buffer 1
<F19> -- buffer 2
<F20> -- buffer 3
When any of these keys is pressed, the screen splits into two
parts, the lower part displaying the buffer that was previously
being edited, the upper part displaying the contents of the newly
selected buffer. (It is possible to select the buffer you are
already editing as the new buffer; in this case you wind up with
two windows into the same file.)
SEDT supplies the following commands for managing files,
buffers, and windows:
Load current file into buffer
.
If you have just entered a new, empty buffer,
<GOLD> <F> allows you to load a file into it or to name
the file that you want to create from it. (SEDT prompts
you at the bottom of the screen to enter the name of the
file.) If you issue this command when the current buffer
contains text that has not yet been saved in a file, you
will receive the message
Save changes to current file? (Y/N):
If you respond affirmatively, a save operation
will be performed; otherwise, the contents of the
current buffer will be discarded. In either case, the
subsequent effect is like entering SEDT on the file whose
name you provide.
SEDT advanced guide, Version 2.1
File-management and buffer-management commands
Zap buffer
.
<GOLD> <Z> causes SEDT to discard the contents of
the current buffer and to forget the file name formerly
associated with it, giving you a clean slate to work on.
If the current buffer contains text that has not been
saved at the time you enter this command, SEDT gives you
one last chance:
Unsaved changes to this buffer. Are you sure? <Y/N>:
A negative response cancels the ZAP operation.
Include file into buffer
.
<GOLD> <G> causes SEDT to copy the contents of a
file that you specify (in response to a further prompt)
into the current buffer immediately before the current
cursor position.
Print current buffer
.
<CTRL/P> transmits the contents of the current
buffer to the LST: device. A prompt allows you to
specify a file name, if that is appropriate.
Load file into paste buffer
.
<GOLD> <F4> prompts you for the name of a file
and copies that file into the (invisible) paste buffer,
from which it can be inserted into the text with <INSERT
HERE>.
Toggle number of windows displayed
.
If the current display consists of two windows,
<GOLD> <D> eliminates the lower one and extends the upper
one so that more of the file being edited can be seen.
If the current display consists of one window, <GOLD> <D>
divides the screen, shrinking the current buffer into the
upper window and displaying the most recently edited
alternative buffer in the lower window. (If no other
buffer has been edited, the lower window is empty.)
Toggle screen width
.
<GOLD> <W> changes the display from 80 columns to
132 columns or from 132 columns to 80 columns.
SEDT advanced guide, Version 2.1
File-management and buffer-management commands
Refresh screen
.
<CTRL/W> blanks the entire screen momentarily.
This command is used when you have two windows into the
same buffer. Normally, any editing changes that are made
in the upper window are not reflected in the lower one;
<CTRL/W> updates both windows so that their contents are
consistent.
The <EXIT> key is a synonym for <GOLD> <E>; the
<INTERRUPT> key is a synonym for <GOLD> <S>; and the <CANCEL>
key is a synonym for <GOLD> <Q>.
<GOLD> <H> activates the help facility, so it is a
synonym for <HELP> and <PF2>. Inside the help facility, you can
press either <NEXT SCREEN> or <RETURN> to advance to the next
screen, either <PREV SCREEN> or <BS> to go back a screen, and
either <EXIT> or the space bar to return to the editing session.
The contents of the help facility are drawn from the SEDTHELP.TXT
file; if this file is not in the default directory, SEDT
displays an error message.
Finally, three notes concerning the screen display:
A star (*) is placed to the left of the file name on line
1 of the display whenever an editing operation that changes the
contents of the buffer has taken place since the file was last
saved.
The notation Ln after the direction indicator in line 1
means that SEDT is recording a sequence of keystrokes for later
execution, rather than executing them interpretively.
If a line displayed on the screen extends beyond the
physical screen margin, a reverse-video > appears at the right
edge.
SEDT advanced guide, Version 2.1
Miscellaneous editing commands
Miscellaneous editing commands
Change case
.
Pressing <GOLD>, then keypad key <1>, usually
causes the character on which the cursor is positioned,
if it is a letter, to change from lower case to upper
case or vice versa. The cursor then advances to the next
character. It is possible to reverse the case of a lot
of letters at once by using <SELECT> to delimit the chunk
within which the reversal is to take place, then pressing
<GOLD> <1>, just as in EDT. If no <SELECT> operation is
active, SEDT will check whether the most recent operation
was a search command, in which case it will reverse the
case of the string that matched the search string. The
one-character "Change case" operation is the default if
neither of these prior conditions holds.
Transpose characters
.
<GOLD> <ENTER> swaps the character on which the
cursor is positioned with the one immediately following
it.
Insert control character
.
To insert an ASCII control character or an
extended ASCII character that the keyboard cannot
normally generate, press <GOLD>, type the ASCII code for
the character as a decimal integer, press <GOLD>, and
finally press keypad key <3>. (In one particular case --
the escape character, ASCII 27 -- there is a shorter way;
just press the <ESC> key twice.)
Search and substitute
.
Pressing <GOLD> and then keypad key <9> causes
SEDT to request two strings, the first a string to be
sought, the second a string that is to replace the first
if it is found. SEDT starts at the current cursor
position and searches in the current direction of motion;
when it finds the string it is looking for, it replaces
it with the new string and positions the cursor on that
new string. Subsequently, pressing keypad key <9>
(without <GOLD>) repeats the operation with the same
strings. <GOLD> <U>, if entered immediately after a
substitution, reverses its effect.
SEDT advanced guide, Version 2.1
Miscellaneous editing commands
Append to paste buffer
.
You can cut out an arbitrary chunk of text and
have it appended to the previous contents of the paste
buffer (instead of displacing them) by using <SELECT> and
cursor movement to define the chunk, then pressing <F4>
rather than <REMOVE>.
SEDT advanced guide, Version 2.1
Additional formatting commands
Additional formatting commands
Hyphenate and reformat
.
<GOLD> <_> places a hyphen and a space at the current
cursor position, presumably the end of a line, and then
backs up a couple of lines and performs a "Fill
paragraph" operation, assuming that the hyphenation will
improve the appearance of the paragraph.
Indenting or extruding a text segment
.
A segment of text that has been isolated with
SELECT (and appears in reverse video in the window) can
be shifted rightwards or leftwards on the screen to any
desired tab stop. Press <GOLD> <+> <CTRL/T> to shift the
selected passage rightwards, <GOLD> <-> <CTRL/T> to shift
it leftwards. (The reference is to the <-> key on the
regular typewriter keyboard, not the one on the numeric
keypad.) To shift more than one tab stops, type the
appropriate decimal numeral immediately before the
<CTRL/T>.
The following three commands can be used to change the
level of indentation (the I mark on the ruler) at any time,
without entering the ruler-editing context):
Reset indentation
.
<CTRL/A> resets the indentation level to the
current cursor position.
Decrease indentation
.
<CTRL/D> decreases the indentation level by one
column.
Increase indentation
.
<CTRL/E> increases the indentation level by one
column.
The following ruler-editing commands, which can be used
after <GOLD> <R> has activated ruler-definition mode, were not
covered in the introductory document:
SEDT advanced guide, Version 2.1
Additional formatting commands
Move the cursor along the ruler
.
<TAB> advances the cursor to the next tab stop;
<BS> returns it to column 1.
Save a ruler in a file
.
It is possible to save as many as ten different
rulers in files in the directory from which SEDT is
invoked. To save the current ruler in a file, press
<GOLD> and (on the ordinary typewriter keyboard) any
digit between 0 and 9. The ruler will be saved in the
file RULERx.TXT, where x is replaced by the digit typed.
Recover a saved ruler
.
To load a ruler that exists in such a file, press
the key for the digit that designates the ruler.
RULER0.TXT has a special status; if SEDT is started from
a directory that has a file with that name, the ruler
contained in that file is loaded during initialization.
Set automatic margin adjustment
.
Pressing <A> activates automatic margin
adjustment, with the effect that when the <RETURN> key is
pressed during editing, the cursor is positioned
immediately below the leftmost nonblank character on the
line just completed. This is used for editing computer
programs.
Remove all formatting controls
.
Pressing the space bar deactivates any formatting
specification at the cursor position.
The complete set of margination rules is as follows:
If L, W, R, and I are all in column 1 (which is the
default if no RULER0.TXT file is found when SEDT is activated),
the user must press <RETURN> at the end of each line, and the
cursor always returns to column 1.
If L appears in a column other than 1, pressing <RETURN>
causes the cursor to return to that column.
If I appears in a column other than 1 and the cursor is
positioned to the left of that column, pressing <TAB> causes the
cursor to move to that column.
SEDT advanced guide, Version 2.1
Additional formatting commands
If A appears in any column, pressing <RETURN> causes the
cursor to return to the position immediately below the leftmost
nonblank character on the line just completed.
If R appears in any column other than 1 and W appears in
any column, typing anything in a column to the right of the R
will cause a word wrap to occur. This has two effects: The word
that extends past the R will be shifted to the following line,
starting at the column in which W appears; and in the old line,
the spacing will be adjusted so that there are two blanks after
each word that ends with a period, question mark, exclamation
point, colon, or semicolon, and one blank after any other word.
Similarly, if R appears in any column other than 1 and A
appears in any column, typing anything in a column to the right
of the R causes a word wrap, with the shifted word being placed
beneath the leftmost nonblank character in the line from which it
was taken.
The rules for a J that appears in any column other than 1
are the same as those for R, except that once the shifted word is
removed to the next line, additional spaces may be inserted into
the remainder in order to bring the right end of the line all the
way out to the column marked with a J.
SEDT advanced guide, Version 2.1
SEDT basic commands
SEDT basic commands
All of the operations that SEDT can perform are
combinations of certain basic commands; SEDT works essentially
as a command interpreter, converting keystrokes into sequences of
basic commands before passing them into the heart of the program
to be carried out. In other words, the basic commands serve as a
sort of intermediate language for editing, much less userfriendly
but considerably closer to the editor's operational level.
Basic commands can be used in four ways in SEDT. In the
first place, if you can formulate a basic command or a sequence
of them, you can issue it at any time during an editing job by
pressing <GOLD>, followed by the keypad key <7>, and responding
to the 'Command:' prompt with the appropriate character string.
Second, you can create a file containing any SEDT "script" -- any
sequence of SEDT operations -- and have it executed during an
SEDT session by pressing <GOLD> <X> and supplying the file name.
Third, you can redefine a key at any time during an editing
session so as to make it equivalent to any sequence of basic
commands; this is discussed in the following section. Fourth,
you can rewrite the file containing the key definitions, thus
modifying the command interpreter to bring it closer to your
vision of the perfect text editor.
SEDT's basic commands are of two types: movement
commands and others. Both kinds can be written either with or
without a period at the end; if a period is present, it signals
EDT that the action described can be taken immediately, whereas a
command without a period is held up pending a further command or
command sequence. Movement commands have the structure
[sign] [count] entity
The sign field is either + (indicating forward movement), -
(indicating backward movement) or omitted (in which case the
movement is in the current default direction of movement). The
count field indicates how many times the component movement is to
be repeated, and may be omitted if the movement is only to be
performed once. The permissible values of the entity field are
as described in the table below.
SEDT advanced guide, Version 2.1
SEDT basic commands
Some SEDT commands require a string argument which is delimited
at both ends by a character that is not part of the string.
@BB Start of buffer
@C Single character
@EB End of buffer
@EL End of line
@F<delimiter>string<delimiter>
Beginning of next occurrence of a string
@L Beginning of line
[count]@M Marked point numbered [count]; default is
point 1
@N Start of occurrence of current search string
@PAG Start of page
@PAR Start of paragraph
@SR Point marked by <SELECT>
@V Same position in adjacent line
@W Start of word
The delimiter that figures in the definition of the @F entity,
here shown as a dollar sign, may be any visible graphic
character, presumably one that does not occur in the string
sought. The same delimiter must be used at each end of the
string.
Inside a non-movement command, a mention of an "entity"
usually refers to the swatch of text between the current cursor
position and the position with which the entity is equated in the
preceding table. Instead of moving the cursor to that other
point, SEDT performs some transformation on the intervening text.
SEDT advanced guide, Version 2.1
SEDT basic commands
Non-movement commands have the structure
[sign] [count] command
Here the sign field, as above, indicates the direction of motion
or of entity-definition for the command. Except as indicated in
the list, the count field again gives a repetition factor and may
be omitted if the command is to be done only once. (Note,
however, that the :CH, :M, and :WI commands, like the @M entity,
pre-empt the count field for their own use.)
:A Set default direction of motion to Forward
:B Set default direction of motion to Reverse
:CCentity Change case within entity
:CDentity Lower-case all letters within entity
:CE Change case in EDT style: throughout <SELECT>
entity if there is one, else throughout
current search string if there is one,
else on current character
count:CH Insert character with specified ASCII value
:CL Center text of current line
:CUentity Upper-case all letters within entity
:Dentity Delete entity
:EAPentity Delete entity and append to deletion buffer
:FE<delimiter>filename<delimiter>
Load the specified file (if it exists) and
begin editing it
:FG<delimiter>filename<delimiter>
Insert the specified file at the current
cursor position
:FS<delimiter>filename<delimiter>
Save current buffer into specified file
:FX<delimiter>filename<delimiter>
Execute SEDT script in specified file
:GAPentity Append entity to deletion buffer without
deleting it
:GEentity Copy entity into deletion buffer without
deleting it
count:GR Load ruler number count
:H Display help message
:I<delimiter>string<delimiter>
Insert string at current cursor position
:Kkey<delimiter>string<delimiter>
Define key as string
:LD Decrease indentation by 1
:LI Increase indentation by 1
:LKkey Load key definition from current buffer
:LNEkey Execute keystrokes saved in key
:LNLkey Save keystrokes into key until key is
retyped
SEDT advanced guide, Version 2.1
SEDT basic commands
:LS Set indentation level to current column
:M Mark current cursor position as point 1
count:M Mark current cursor position as point count
:NL Insert newline character
:NS Repeat substitution with previously defined
substituend
:OE<delimiter>message<delimiter>
Display message and take normal error
action
:OM<delimiter>message<delimiter>
Display message
:OL Open line at present cursor position
:OS Toggle between overstrike and replace mode
:PD Insert current date in format DD-MMM-YYYY
:PL<delimiter>filename<delimiter>
Load specified file into paste buffer
:PR<delimiter>filename<delimiter>
Print current buffer on LST: device
:PS<delimiter>filename<delimiter>
Save paste buffer to specified file
:Q Abort without saving file
:REP Substitute contents of paste buffer for
search string
:RF Re-draw the screen
:RL Switch to ruler-definition mode
:RS Cancel select point
:SC Display column position of cursor
:SEL Save current cursor position as select point
:SKkey Save key definition in current buffer
:SLentity Load contents of entity into search string
:SUB<delimiter>object<delimiter>target<delimiter>
Substitute target string for next occurrence
of object string
:SYS<delimiter>string<delimiter>
Spawns string as a command to the MS-DOS
operating system
:TAB Insert enough tab and space characters to
advance to next tab stop
:TADentity Realign left margin within entity by one
tab stop in the default direction
:TFentity Fill within entity
:TI Stop repeating current command sequence when
any key is pressed
:TT Toggle between insertion and expansion of
tab characters
:UC Undelete last-deleted character
:UL Undelete last-deleted line
:UM Undo last movement or substitution command
:UPAG Undelete last-deleted page
:UPAR Undelete last-deleted paragraph
SEDT advanced guide, Version 2.1
SEDT basic commands
:UPD Update screen, including header
:USEN Undelete last-deleted sentence
:USR Insert contents of paste buffer at current
cursor position
:UU Undelete last unknown entity
:UW Undelete last-deleted word
:WC Toggle between one- and two-window display
:WD Toggle between 80- and 132-column display
count:WI Switch to buffer number count (0, 1, 2, or 3)
:X Exit and save file after creating backup
:Z Erase current buffer
SEDT advanced guide, Version 2.1
SEDT basic commands
The arguments for certain of the commands need to be explained.
An entity can be any of the strings defined in the first table
above. A key is a string of one of the following forms:
Annn
Fnnn
GAnnn
GFnnn
where 'nnn' is to be replaced by three decimal digits. The form
'Annn' designates the key that generates the ASCII character
whose code is nnn. 'Fnnn' designates function key number nnn, as
follows:
F000 -- <COMPOSE CHARACTER>
F001 -- <HOLD SCREEN>
F002 -- <PRINT SCREEN>
F003 -- <SET-UP>
F004 -- <F4>
F005 -- <BREAK>
F006 -- <INTERRUPT>
F007 -- <RESUME>
F008 -- <CANCEL>
F009 -- <MAIN SCREEN>
F010 -- <EXIT>
F011 -- <ESC>
F012 -- <BS>
F013 -- <LF>
F014 -- <ADDTNL OPTIONS>
F015 -- <HELP>
F016 -- <DO>
F017 -- <F17>
F018 -- <F18>
F019 -- <F19>
F020 -- <F20>
F021 -- <FIND>
F022 -- <INSERT HERE>
F023 -- <REMOVE>
F024 -- <SELECT>
F025 -- <PREV SCREEN>
F026 -- <NEXT SCREEN>
F027 -- <up arrow>
F028 -- <left arrow>
F029 -- <down arrow>
F030 -- <right arrow>
F031 -- keypad <0>
F032 -- keypad <1>
F033 -- keypad <2>
F034 -- keypad <3>
F035 -- keypad <4>
SEDT advanced guide, Version 2.1
SEDT basic commands
F036 -- keypad <5>
F037 -- keypad <6>
F038 -- keypad <7>
F039 -- keypad <8>
F040 -- keypad <9>
F041 -- keypad <,>
F042 -- keypad <->
F043 -- keypad <.>
F044 -- <PF1>
F045 -- <PF2>
F046 -- <PF3>
F047 -- <PF4>
F048 -- <ENTER>
The prefix 'G' differentiates the cases in which <GOLD> is
pressed before the indicated typewriter or function key.
To indicate that a sequence of commands is to be repeated
as a unit, one can enclose the entire sequence in parentheses and
prefix a count (a decimal integer) to it to indicate the number
of repetitions. A count of 0, in this context, indicates that
the sequence is to be repeated indefinitely, until an error
occurs or until the :TI operation detects that a key has been
pressed. (For instance, the definition of the <GOLD> <left
arrow> operation is
0(-@L:TI).
-- that is, "move in reverse to successive beginnings of lines
until an error occurs or a key is pressed."
A sequence of commands can be execute only if the current
buffer has been modified by enclosing the enclosing the commands
with ^C( and ). This contruct is useful for saving a modified
file before spawning to a postprocessor. A variation of this
contruct is to have two sequences of commands separated by |
within the parentheses which causes the first sequence to be
executed if the buffer is modified and the second if not
modified.
SEDT advanced guide, Version 2.1
SEDT basic commands
It is also possible to program error handling into a key
definition with the construct:
^E(command1)(command2)
The string of commands in command1 is executed. If an
error occurs anywhere in these the rest of command1 is skipped
and the sequence command2 will be executed. If no error occurs
command2 will be skipped. A slightly more complex variant is:
^E(command1)(command2|command3)
Command1 is executed and if any error occurs the rest of
command1 will be skipped and the sequence command2 executed. If
no error occurs command3 will be executed after completion of
command1. You can force SEDT to ignore errors in a command by
enclosing it in the following construct:
^E(command)()
The key-definition file is SEDTKEYS.TXT; SEDT consults
this file during initialization every time it is activated.
Therefore, all you need to do in order to customize SEDT is to
modify this file, which is a text (non-binary) file containing
lines of the form
<key><command sequence>
Substitute the commands you prefer, or add new key definitions at
the end of the file.
In the key-definition file it is possible to specify that
a particular command should display a prompt and wait for input,
which it then incorporates into the basic command. A key
definition containing an exclamation point followed by a
delimited string (any visible character may be used as a
delimiter), when executed, prints out the specified string as a
prompt and waits for a keystroke, optionally preceded by <GOLD>.
The name of the key thus detected is edited into the command.
Similarly, a key definition containing a question mark
followed by a delimited string prints out the specified string as
a prompt and waits for a string input, terminated by <RETURN>,
<DO>, or <ENTER>. The input string is then incorporated into the
instruction.
SEDT advanced guide, Version 2.1
SEDT basic commands
The construction %F is a key definition is replaced by
the name of the current default output file, including the
filetype; %N is replaced by the filename proper of the current
default output file (excluding the filetype).
Question marks, exclamation points, or percentage signs
that appear in key definitions for any other purpose must be
doubled.
SEDT advanced guide, Version 2.1
Defining and redefining keys
Defining and redefining keys
If you have some sequence of commands that needs to be
repeated many times during an editing session, you can define a
key to designate the entire sequence:
Define (or redefine) any key
.
Causes SEDT to issue two prompts. The first,
'Key:', asks the user to press the key or combination of
keys to be defined; the second, 'As:', asks the user to
press the sequence of keys that the defined key is to
abbreviate. As the keys are pressed, the basic commands
that they stand for appear at the bottom of the screen.
(It is also possible to reply to the 'As:' prompt by
typing in the sequence of basic commands to be executed,
in the format described in the previous section. This
will be necessary if the command to be abbreviated
includes any key that is used for editing the command
line itself, such as the left arrow or the boxed X.)
Saving keystrokes for later execution
.
After <GOLD> <F17>, any sequence of keystrokes
that you supply is stored in memory instead of being
executed immediately. The sequence is to be terminated
by <CTRL/Z>. It may not include <GOLD> <F18>, since this
would lead to an infinite loop on execution (see the next
command).
Executing stored keystrokes
.
A sequence of keystrokes that has been stored
with the preceding command can be activated by pressing
<GOLD> <F18>.
Display a default key definition
.
You can examine the SEDTKEYS.TXT file, which
contains the default key definitions, without leaving
SEDT, as follows: Press <GOLD> <CTRL/I>, and reply to
the prompt "Key:" by pressing the key that you wish to
redefine; the current definition, spelled out in terms
of SEDT's basic commands, will appear in the buffer at
the current cursor position.
SEDT advanced guide, Version 2.1
Defining and redefining keys
Edit a default key definition
.
You can also edit the SEDTKEYS.TXT file without
leaving SEDT: Prepare the line containing the definition
in the buffer, then press <GOLD> <CTRL/L> and reply to
the prompt "Key:" by pressing the key to be redefined.
The SEDTKEYS.TXT file will be modified accordingly.
SEDT advanced guide, Version 2.1
Appendix A
Appendix A
IBM to Digital keyboard translation
Digital key PC key
F1 ALT 1
F2 ALT 2
F3,Setup ALT 3
F4 ALT 4
F5,Break ALT 5
F6,Interrupt ALT 6
F7,Resume ALT 7
F8,Cancel ALT 7
F9,Main Screen ALT 8
F10,Exit ALT 9
F11,ESC ALT Q
F12,BS ALT W
F13,LF ALT E
F14,Additional Options ALT R
F15,Help ALT T, Shift keypad 5
F16,Do ALT Y, Shift keypad +
F17 ALT U
F18 ALT I
F19 ALT O
F20 ALT P
Find F1, Shift keypad 7
Insert Here F3, Shift keypad 0
Remove F4, Shift keypad .
Select F2, Shift keypad 1
Prev Screen F5, Shift keypad 9
Next Screen F6, Shift keypad 3
Up Arrow F7, Shift keypad 8
Left Arrow F9, Shift keypad 4
Down Arrow F8, Shift keypad 2
Right Arrow F10, Shift keypad 6
Keypad 0 Keypad 0
Keypad 1 Keypad 1
Keypad 2 Keypad 2
Keypad 3 Keypad 3
Keypad 4 Keypad 4
Keypad 5 Keypad 5
Keypad 6 Keypad 6
Keypad 7 Keypad 7
Keypad 8 Keypad 8
Keypad 9 Keypad 9
Keypad , PC: Shift keypad -; AT: Keypad -
Keypad - PC: Keypad -; AT: Prt Sc
Keypad . Keypad .
Keypad PF1 PC: Num Lock; AT: Esc
Keypad PF2 PC: Shift Num Lock; AT: Num Lock
Keypad PF3 Scroll Lock
Keypad PF4 PC: Shift Scroll Lock; AT: Sys
Keypad Enter Keypad +