Trailing-Edge
-
PDP-10 Archives
-
tops20tools_v6_9-jan-86_dumper
-
tools/sed-for-vms/sed.rnh
There are 5 other files named sed.rnh in the archive. Click here to see a list.
.require "Rno:TopicInit"
.require "Rno:Topic"
SED
.nf
! SED.RNH - Processed by RUNOFF $$Hours:$$Minutes $$Month $$Day, $$Year
! Written: 21-Sep-82/SLP
! Updated: 11-May-83/MEH
!
! 27-Dec-82/SLP Added /SCROLL.
! 11-Apr-83/MEH Added updates on /TERM and /KEYPAD.
! 11-May-83/MEH More updates on /TERM and /PROG.
!
.f
.require "Rno:TopicText"
Invokes SED, a full screen-oriented text editor. The format of the SED
command is [items enclosed in square brackets are optional]:
.b.i5
SED [filespec[=][/qualifier(s)]]
SED is documented in the SED tutorial (SYS$DOC:SED.MAN)
and SED reference (SYS$DOC:SED.DOC) manuals.
.!----------------------------------------------------------------------
.require "Rno:Topic"
Overview
.require "Rno:TopicText"
SED is a full screen text editor. It is easier and more natural to use
than line or character editors like SOS or TECO, and is generally faster
too. SED lets your display terminal's screen become a window through
which you can see and edit a text file. The window is updated
immediately as you make changes, so you always see exactly what your
file looks like.
SED is easy to use. To enter text into your file, just type. To change
existing text, just type over it. There are commands to move around on
the screen, move around in the file, insert or delete lines or spaces,
move text from one place to another, search, edit two files at the same
time, get help, and other useful things. For sophisticated users, SED
has a "macro" facility, too.
.require "Rno:TopicEnd"
.!----------------------------------------------------------------------
.require "Rno:Topic"
Restrictions
.require "Rno:TopicText"
This VAX version of SED was written and
is still under development here at BYU.
It is based on the DEC-10 version of SED written by Christopher Hall,
a DEC employee.
SED was so popular on our DEC-10 that we decided to make it available
on our new VAX system.
Most of the commands and features of DEC-10 SED have been implemented;
the rest are coming!
The current version of SED runs on the following terminal types:
A true DEC VT52,
Infoton 200,
Ramtek 6211 graphics terminal,
DEC VT100,
Televideo 910,
and Visual 200 in VT52+ mode.
However, SED can be configured to run on many other terminals
too. Please contact a Consultant, 424 CB, 378-4941, for more
information.
As previously stated, SED is still under development.
Please report any bugs in SED to MANAGER via the MAIL command.
The following is a list of
known deficiencies or problems in VAX SED.
We plan to fix all of them (eventually).
.ls
.le;Don't type Control-Ys (the <ROLL-FORWARD-PAGE> command)
too fast. If you type two
<ROLL-FORWARD-PAGE> commands in succession such that you type the second
<ROLL-FORWARD-PAGE> before the first <ROLL-FORWARD-PAGE> finishes,
SED will drop to DCL command level.
This is intentional. SED is still
under development. We need a way to stop SED when a newly discovered bug
puts SED in a loop!
If you do type Control-Ys too fast and find yourself at DCL level,
you can still return to SED without losing anything.
Just type "CONTINUE" and press return
(then type a <REWRITE-SCREEN> command).
.le
Certain commands will clear the pick buffer: <HELP> and reading
an execute command file indirectly (<ENTER>@file.xct<EXECUTE>).
.le
SED's "looking through a list of files" option, described in Appendix
B of SED.DOC, is not implemented.
.le
The SED reference manual (SYS$DOC:SED.DOC) describes the DEC-10
version of SED. It hasn't been edited for the VAX yet. However, you
can still use it.
The only noticeable difference
between SED on the DEC-10 and
on the VAX is in the way you specify a file name.
All the commands (that are implemented) still work the same.
The SED tutorial manual (SYS$DOC:SED.MAN) has been edited for the VAX.
Where the SED tutorial and reference manuals disagree, the tutorial is
correct.
.els
.require "Rno:TopicEnd"
.!----------------------------------------------------------------------
.require "Rno:Topic"
Parameters
.require "Rno:TopicText"
.i5;filespec
The name of the file you wish to create or edit.
There are three ways to specify the filespec when you
start up the SED editor. At DCL command level type:
.lm+19
.b.i-16
SED#filespec=###SED will find or create (if the file doesn't exist
yet) the specified file.
SED's editing window is positioned to the beginning of the file.
.b.i-16
SED#filespec####SED will find the specified file.
SED's editing window is positioned to the beginning of the file.
.b
If SED can't find the
file, a "file not found" error message is displayed.
SED will then return you to the previous file you were
editing (if there was one).
If you haven't edited a file yet, SED will display a cheery welcoming message.
.b.i-16
SED#############SED will return you to the last file you edited with
SED. SED's editing window is positioned to the same place
in the file as where you left off last time.
.b
If you haven't edited a file yet, SED will display a cheery welcoming message.
.lm-19
.require "Rno:TopicEnd"
.!----------------------------------------------------------------------
.require "Rno:Topic"
Commands
.require "Rno:TopicText"
SED has over 50 built-in commands (you can also define your own). They
are summarized below. The commands are grouped by the function they
perform. For complete SED command descriptions, see the SED tutorial
(SYS$DOC:SED.MAN) and reference (SYS$DOC:SED.DOC) manuals.
Or try SED's built-in HELP facility.
.b.nf.keep
COMMANDS to MOVE the CURSOR
----------------------------------------------------------------
CURSOR-UP Move the cursor up
CURSOR-DOWN Move the cursor down
CURSOR-LEFT Move the cursor to the left
CURSOR-RIGHT Move the cursor to the right
CURSOR-HOME Move the cursor to the upper left
CARRIAGE-RETURN Move the cursor to start of next line
TAB Move cursor to the next tab stop
BACKTAB Move cursor to the previous tab stop
UP-TAB Up-tab (6 cursor-ups)
DOWN-TAB Down-tab (6 cursor-downs)
LINE Move to beginning or end of line
BEGIN-LINE Move to beginning of line
END-LINE Move to end of line
COMMANDS to MOVE the WINDOW
----------------------------------------------------------------
ROLL-FORWARD-PAGES Move window forward some pages
ROLL-FORWARD-LINES Move window forward some lines
ROLL-BACK-PAGES Move window back some pages
ROLL-BACK-LINES Move window back some lines
SLIDE-LEFT Move viewing window to the left
SLIDE-RIGHT Move viewing window to the right
PERCENT-GOTO Move window a percentage into the file
COMMANDS to INSERT and DELETE
----------------------------------------------------------------
INSERT-SPACES Add some spaces at the cursor
DELETE-SPACES Remove some characters from a line
INSERT-LINES Add some blank lines at the cursor
DELETE-LINES Remove some lines at the cursor
ERASE-LINE Erase from cursor to end of the line
.if old
CLEAR-LINE Erase the line below the cursor
.ei old
DELETE-CHARACTER Delete the character to left of cursor
ERASE-WORD Delete previous word
INSERT-MODE Insert/replace mode toggle
ENTER-CONTROL-CHARACTER Make the next character typed a control char
REAL-TAB Insert a real tab (Same as <E-C-C>I)
PICK Load buffer with text from the file
PUT Add text to the file from a buffer
MARK Mark position for PICK or DELETE-LINES
COMMANDS to ENTER or EDIT PARAMETERS
----------------------------------------------------------------
ENTER Set up an argument for a command
RECALL Recall latest argument
RESET Cancel argument; rewrite cursor, line,
or screen
COMMANDS to SEARCH and SUBSTITUTE
----------------------------------------------------------------
SEARCH-FORWARD Search from cursor toward end of file
SEARCH-BACKWARD Search from cursor toward start of file
SUBSTITUTE Search for a string _& substitute another
COMMANDS to EXIT, SAVE, or SELECT a FILE
----------------------------------------------------------------
EXIT Save file and exit
ABORT Exit, forgetting changes
SAVE-FILE Save file without exiting
SET-FILE Set up a new file for editing
MISCELLANEOUS COMMANDS
----------------------------------------------------------------
CASE Change case of letter at cursor
EXECUTE Set up or execute a sequence of commands
HELP Give help (individual command summaries)
REWRITE Rewrite screen (Same as <ENTER>_^<RESET>)
SWITCH Set/query operating switches
TAB-SET/CLEAR Set or clear settable tabs
WINDOW Set or clear split screen windowing
.f
.!require "Rno:TopicEnd"
.!----------------------------------------------------------------------
.require "Rno:Topic"
Executing__SED__Commands
.require "Rno:TopicText"
About half of SED's commands are executed by typing a CONTROL CHARACTER.
The rest are executed by typing a two character ESCAPE SEQUENCE or (if
your terminal has them) by pressing a FUNCTION KEY. Therefore, what you
type may vary somewhat from terminal to terminal.
.if old
Refer to the "SPECIAL NOTES" section for specifics.
.ei old
.!require "Rno:TopicEnd"
.!----------------------------------------------------------------------
.require "Rno:Topic"
Control__Character__Commands
.require "Rno:TopicText"
Typing a CONTROL CHARACTER means to momentarily hold down the CONTROL
key (usually labelled 'CTRL') while you press one of the other keys
(usually a letter) on the keyboard. This is similar to the way you use
the SHIFT key on a typewriter. You'll find the CONTROL key on the left
side of the keyboard, near the SHIFT key. Thirty-two characters can be
typed as control characters: A-Z, [, @, __, ], _^, and _\. For alphabetical
control characters, no distinction is made between upper and lower case:
CONTROL-A is the same as CONTROL-a.
Reguardless of the terminal you use, SED commands invoked by the
alphabetical
control
characters are assigned as shown below.
The location and commands assigned to the [, @, __, ], _^ and _\ keys vary.
.if old
(There are (of course) a few
rare exceptions; see the "SPECIAL NOTES" section.)
.ei old
.b
.if old
.literal
Note: the location of the [, @, _, ], ^ and \ keys varies.
Note: for ENTER-PARAMETER, press [ (or ESCAPE) key TWICE.
._____. ._____. ._____. ._____. .___________.
|ENTER| |SUBST| |LINE | |ERASE| | SLIDE |
|PARAM| |ITUTE| | | |LINE | |LEFT RIGHT|
| [ | ... | @ | ... | _ | ... | ] | ... | ^ \ |
|_____| |_____| |_____| |_____| |_____|_____|
.end literal
.ei old
.literal
.___________________________________________________________.
| ROLL-BACK | SEARCH |ROLL-FORWRD| TAB |ENTER|PRCNT|
|PAGES LINES|BKWRD FORWD|LINES PAGES|BKWRD FORWD|C-CH |GOTO |
| q w | e r | t y | u i | o | p |
|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|
|INSRT DELET|INSRT DELET|PUT | CURSOR |
| SPACES | LINES | |LEFT DOWN UP RIGHT|
| a s | d f | g | h j k l |
|_____|_____|_____|_____|_____|_____|_____|_____|_____|
|EXIT |EXE- |ABORT|PICK |SET |SWTCH|RE- |
| |CUTE | | |FILE | |TURN |
| z | x | c | v | b | n | m |
|_____|_____|_____|_____|_____|_____|_____|
.end literal
Notice how the commands are grouped. There is no mnemonic relationship
(except by coincidence) between the name of a command and the key it is
on. Instead, commands with similar functions are placed near each other.
Most SED users agree that this system is better than a mnemonic placement
which would chaotically scatter the commands all over the keyboard.
.require "Rno:TopicEnd"
.!----------------------------------------------------------------------
.require "Rno:Topic"
Escape__Sequence__Commands
.require "Rno:TopicText"
Typing an ESCAPE SEQUENCE means to type two keys in succession (not
simultaneously). The first key you type is always an ESCAPE. The second
key you type is usually a letter. If your terminal doesn't have a lot of
function keys, you'll probably have to type some SED commands as escape
sequences.
(Note: the Visual 200, DEC VT52 and VT100 terminals have function keys.
Therefore, these
terminals DO NOT use the escape sequences described in this section.)
SED commands invoked by an escape sequence are assigned as shown below.
Note: it doesn't matter whether the second character of the sequence is
typed in upper or lower case.
.b.literal
._________________________________________________________________.
|ENTER|REWRT|ERASE|END |SLIDE|REAL |TAB |UP |INSRT|WIN- | |
|PARAM|SCREN|WORD |LINE |RIGHT|TAB |SET/C|TAB |MODE |DOW | |
| esc | q | w | e | r | t | y | u | i | o | p |
|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|
|RECAL|SAVE |DELET| | |CURSR|DOWN |ERASE|SLIDE|
| |FILE |CHAR | | |HOME |TAB |LINE |LEFT |
| a | s | d | f | g | h | j | k | l |
|_____|_____|_____|_____|_____|_____|_____|_____|_____|_______.
|RESET|LINE |CASE | |BEGIN|IN- |MARK | | |HELP |
| | | | |LINE |VERT | | < | > | ? |
| z | x | c | v | b | n | m | , | . | / |
|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|
.end literal
Unlike the CONTROL CHARACTER commands, notice that there is (as much as
possible) a mnemonic relationship between the name of an ESCAPE SEQUENCE
command and the key to which it is assigned.
.require "Rno:TopicEnd"
.!----------------------------------------------------------------------
.require "Rno:Topic"
Function__Key__Commands
.require "Rno:TopicText"
Typing a FUNCTION KEY means to press a specially labelled key. Function
keys are provided for convenience. Pressing one is equivalent to typing
a control character or an escape sequence.
.b.nf.keep
All terminals minimally have
DELETE Also labelled: DEL, RUBOUT, RUB or RO
Equivalent to: (no equivalent)
SED command: DELETE-CHARACTER
ESCAPE Also labelled: ESC, ALTMODE, ALT, SELECT, SEL
Equivalent to: CONTROL-[
SED command: ENTER-PARAMETER (press twice)
HELP (press four times)
LINE FEED Also labelled: LF
Equivalent to: CONTROL-J
SED command: CURSOR-DOWN
RETURN Also labelled: CR, RET, or NEW LINE
Equivalent to: CONTROL-M
SED command: RETURN
Most terminals will also have
BACKSPACE Also labelled: BS, BACK
Equivalent to: CONTROL-H
SED command: CURSOR-LEFT
TAB Also labelled: (no other label)
Equivalent to: CONTROL-I
SED command: TAB-FORWARD
.f
Many terminals have additional function keys. Cursor mover keys are
labelled with directional arrows. Other function keys are usually
labelled F1, F2, F3, etc.; or perhaps PF1, PF2, PF3, etc.
They are commonly placed across the top and/or
down the side of the keyboard. On some terminals, the numeric keypad
doubles as an extra set of function keys.
When pressed, these additional function keys send a control character or
an escape sequence. Unfortunately, the code sent varies from one
terminal model to another. So does the location and number of function
keys. Therefore, the SED command invoked by pressing a function key
depends on which terminal model you are using.
The only terminals with "additional" function keys used by the current
version of SED are: Visual 200, DEC VT52 and VT100. Therefore, these
terminals DO NOT use the escape sequences defined in the previous
section, "ESCAPE SEQUENCE COMMANDS."
.if old
For more details, see the "SPECIAL
NOTES" section later in this summary.
.ei old
.require "Rno:TopicEnd"
.require "Rno:TopicEnd"
.require "Rno:TopicEnd"
.!----------------------------------------------------------------------
.require "Rno:Topic"
Qualifiers
.require "Rno:TopicText"
Qualifiers (switches)
tailor SED's operation to your liking. They can be given as
part of the file name in the DCL level SED command, in your
SED.INI file, or via the <SWITCH> and <SET-FILE> commands while
within SED.
You only have to type enough of the qualifier name to
make it unique ("/T" is good enough for TABS).
You can set more than one switch by separating them with slashes, for
example /TABS=6/CASE/BACK
Each qualifier and its default setting is listed below.
.b.nf
/Qualifier Default
---------- -------
/AGAIN[=n]
/ALT[=n]
/[NO]APPND /NOAPPND
/[NO]BACKUP /BACKUP
/[NO]BEEP /NOBEEP
/[NO]CASE /NOCASE
/[NO]CREATE /NOCREATE
/[NO]DTABS /NODTABS
/GOTO=n /GOTO=0
/[NO]HELP /HELP
/[NO]ICR /NOICR
/[NO]ID /NOID
/[NO]IMODE /NOIMODE
/[NO]INVRT /INVRT
/[NO]ISAVE[=n] /NOISAVE (/ISAVE=0)
/[NO]ITABS /ITABS
/[NO]JOURN /NOJOURN
/[NO]KEYPAD /KEYPAD
/LENG=n /LENG=24
/LMAR=n /LMAR=1
/[NO]MESSAGE /MESSAGE
/OUT=filespec
/[NO]PAGE /NOPAGE
/[NO]PROG=filespec /NOPROG
/[NO]QUICK /NOQUICK
/[NO]RAISE /RAISE
/[NO]RCUR /NORCUR
/[NO]READ /WRITE (/NOREAD)
/[NO]RECOV /NORECOV
/[NO]RESET /RESET
/[NO]RMAR=n /RMAR=80
/[NO]ROLL /ROLL
/[NO]SAVE[=n] /NOSAVE (/SAVE=0)
/[NO]SCROLL /NOSCROLL
/[NO]SHOW /NOSHOW
/[NO]SLIDE[=n] /SLIDE=8
/[NO]TABS[=n] /TABS=8
/[NO]TSET=n
/[NO]UPPER /NOUPPER
/WIDTH=n /WIDTH=80
/[NO]WRITE /WRITE (/NOREAD)
/X[=name]=txt
/TERM=type
.f
.b2.i-1;/AGAIN
.b.i2;/AGAIN
.i2;/AGAIN=n
/AGAIN may be given in a <SET-FILE> command.
If you are editing FILE.FOO,
typing <ENTER>/AG<SET-FILE> acts the same as if the parameter
were "FILE.FOO".
This qualifier is useful when you want to make the current and alternate
file be the same file -- allowing you to toggle back and forth between
two places in the same file.
Do not use explicit filespecs with /AGAIN.
/AGAIN=n acts the same as /AGAIN/GOTO=n
-- the numeric argument is a percentage of the way into the file.
.b2.i-1;/ALT
.b.i2;/ALT
.i2;/ALT=n
/ALT may be given on the DCL level SED command.
It swaps the current and alternate files you
were editing last time.
/ALT=n acts the same as /ALT/GOTO=n
- the numeric argument is a percentage of the way into the file.
.b2.i-1
/APPND
.b
.i2;/APPND
.i2;/NOAPPND##(D)
Controls whether <PICK> appends to the PICK buffer, or overwrites it.
/APPND causes <PICK>s to append to the PICK buffer
until /NOAPPND or another /APPND is typed.
/NOAPPND causes <PICK>s to overwrite the PICK buffer. This is the default.
.b2.i-1
/BACKUP
.b.i2;/BACKUP####(D)
.i2;/NOBACKUP
Controls whether SED overwrites or creates a new version of the file you are
editing.
/BACKUP causes SED to create a new version of your file each time it is edited.
This is the default.
/NOBACKUP causes SED to overwrite the file each time it is edited.
This saves disk
space, but you lose the original version of the file.
.b2.i-1
/BEEP
.b
.i2;/BEEP
.i2;/NOBEEP##(D)
Controls whether your terminal beeps or displays a message when SED is in
INSERT mode.
/BEEP causes the terminal to beep once when entering INSERT mode and
twice when entering REPLACE mode.
/NOBEEP causes an "INSERT MODE" message to appear on the bottom line of
the terminal when SED is in INSERT mode. No message is displayed when
SED is in REPLACE mode. This is the default.
.b2.i-1
/CASE
.b
.i2;/CASE
.i2;/NOCASE##(D)
Controls whether searches are case-dependent.
/CASE makes searches case-dependent, i.e., the key "THE" is different
from the key "the".
/NOCASE makes searches independent of case, i.e.,
the key "THE" will match the first occurrence of "THE", "the", "tHe", etc.
This is the default.
.b2.i-1
/CREATE
.b
.i2;/CREATE
.i2;/NOCREATE##(D)
Controls whether an equal sign (=) is needed after the name of a file
you want to create.
/CREATE frees you from having to type an equal sign (=) after the name
of the file you want to create with SED. (SED will first still
try to find the file you specified, including trying default
file extensions, before it gives up and creates the new file.)
/NOCREATE causes SED to create a new file only if the file name is
followed with an equal sign (=). This is the default.
.b2.i-1
/DTABS
.b
.i2;/DTABS
.i2;/NODTABS##(D)
Controls whether TABS in a file are highlighted.
/DTABS causes tabs to identify themselves. Each tab
displays as a highlighted "I" followed by one fewer space than
usual (so the columns on the screen are still aligned properly).
/NODTABS inhibits any special indication of TABs in your file.
This is the default.
.b2.i-1;/GOTO
.b.i2;/GOTO=n
/GOTO=n may be used when running SED or doing a <SET-FILE>. The file will be
displayed starting n percent of the way into the file. If your specify /GOTO
without an argument,
SED will use the current percent value (default is n=0).
.b2.i-1
/HELP
.b
.i2;/HELP####(D)
.i2;/NOHELP
Controls what key(s) you type to get help about SED commands.
/HELP enables on-line help when <ENTER><ENTER> is typed, as well as <HELP>.
This is the default.
/NOHELP inhibits on-line help when <ENTER><ENTER> is typed. The only way
to get help is with <HELP>.
.b2.i-1
/ICR
.b
.i2;/ICR
.i2;/NOICR##(D)
Controls what happens when you press <RETURN> in INSERT mode.
/ICR causes a <RETURN> typed in INSERT mode to insert a
carriage return, linefeed into your text. If you are in the middle
of a line, the line is broken into two lines.
/NOICR causes a <RETURN> typed in INSERT mode just to position the
cursor to the beginning of the next line. This is the same way <RETURN>
works in REPLACE mode. This is the default.
.b2.i-1
/ID
.b
.i2;/ID
.i2;/NOID##(D)
Controls whether an identifying line is added to the beginning of a file
each time it is edited.
/ID causes an identifying line to be inserted at the beginning of a file
when it is saved.
The line contains the filespec, the date and time,
and the name of the user who edited the file.
/NOID prevents an identifying line from being inserted in the file.
This is the default.
.b2.i-1;/IMODE
.b.i2;/IMODE
.i2;/NOIMODE##(D)
Controls whether SED is in replace or insert mode.
This qualifier performs the same function as the <INSERT-MODE> command.
/IMODE puts SED in insert mode. This
qualifier can also be used in execute buffers ($IM_^SW).
/NOIMODE puts SED in replace mode. This is the default.
.b2.i-1
/INVRT
.b
.i2;/INVRT####(D)
.i2;/NOINVRT
Controls the action of the <CASE> command.
/INVRT causes <CASE> to invert the case of a letter. "S" becomes "s",
"p" becomes "P", etc. This is the default.
/NOINVRT causes <CASE> to use the setting of the /RAISE qualifier.
See /RAISE.
.b2.i-1
/ISAVE
.b.i2;/ISAVE=n
.i2;/NOISAVE##or##/ISAVE=0##(D)
Causes an incremental save of your file every n commands.
Default is n=0 (i.e., no incremental saves).
/ISAVE and /SAVE can be used together. When the counter for either one
reaches its limit, the file is saved, and both counters are reset.
.b2.i-1
/ITABS
.b.i2;/ITABS####(D)
.i2;/NOITABS
Controls whether SED can use tab characters to extend a line.
/NOITABS - If you type something beyond the end of a line SED will insert
only spaces so the character is properly positioned.
/ITABS - If you type something beyond the end of a line,
SED will use tabs where possible instead of spaces
so the character is properly positioned.
This is the default.
.b2.i-1
/JOURN
.b.i2;/JOURN
.i2;/NOJOURN##(D)
Controls whether SED makes a journal of your editing session.
/JOURN starts a journal into which SED logs all the commands and text
typed during an editing session. The journal file (SEDJRN.TMP)
can be used to recover your work after a system crash. See
/RECOV.
/NOJOURN stops journaling, if it was in effect. This is the default.
.b2.i-1;/KEYPAD
.b.i2;/KEYPAD####(D)
.i2;/NOKEYPAD
This qualifier applies only to VT100 and VT52 terminals.
/KEYPAD tells SED to put your terminal's keypad in alternate keypad
mode. This is the default on VT100 terminals. The keypad to the right of the
keyboard is then used as a set of function keys, rather than a numeric
keypad.
/NOKEYPAD takes your terminal's keypad out of alternate keypad mode. The
keys can then be used as a numeric keypad.
.if old
This switch currently is of value only for VISUAL 200
terminals. Normally, the Visual 200 "comes up" in standard
keypad mode (pressing a key types a number. You have to hold
down "convert function" to make function keys out of the
keypad.). If the /KEYPAD switch is given in SWITCH.INI or on the
monitor level SED command, then the keypad is put in alternate
keypad mode. Then pressing a key invokes a command, rather than
typing a number. See DOC:SEDVS2.KYS for details.
.ei old
.b2.i-1
/LENG
.b.i2;/LENG=n##(D=24, usually)
Causes SED to think your terminal is n lines long. Good for
limiting the amount of information written on a slow terminal.
The default for n is the number of lines displayable on your terminal,
usually 24.
.if old
+LINEFD enables the <CLEAR-LINE> command, as distinct from the cursor
down command. If this switch is off <CLEAR-LINE> will perform a
cursor down.
.ei old
.b2.i-1
/LMAR
.b.i2;LMAR=n##(D=1)
/LMAR=n - Sets the left margin to be column n. Default is 1.
.b2.i-1
/MESSAGE
.b.i2;/MESSAGE####(D)
.i2;/NOMESSAGE
/MESSAGE causes an identifying "; This is file ..." line to be inserted
automatically as the first line of a new file.
/NOMESSAGE suppresses the identifying line (and the cheery "Hi! This is
SED..." message normally displayed when there is no file to edit).
.b2.i-1
/OUT
.b.i2;/OUT=filespec
Changes the name of the file being edited (or being set
to, if the qualifier is given in a <SET-FILE> or DCL level SED
command) to be FILESPEC.
.b2.i-1
/PAGE
.b.i2;/PAGE
.i2;/NOPAGE##(D)
Controls how the <SWITCH> command displays the current line number.
/PAGE causes <SWITCH> to output your position as PAGE-LINE
from the start of file. Pages are delimited by formfeeds (_^L).
/NOPAGE causes <SWITCH> to output your position as the total number of
LINES from the start of file. This is the default.
.b2.i-1
/PROG
.b.i2;/PROG=filespec
The /PROG qualifier establishes a program, DCL command, or Command
Procedure to be executed upon exiting from SED. The qualifier may
be included as part of the SED command at command level or it may
be placed in the SED.INI file. The program to execute can also be
established while in SED using the <ENTER>program<SWITCH> sequence.
If the sequence <ENTER><EXIT> is used, the default program to run
is SYS$BYU:COMPIL. For more information on COMPIL, type the DCL
command "HELP COMPIL".
Some examples of this qualifier appear below:
.blank
.i 5;/PROG=RUNOFF will cause RUNOFF to be run upon exiting from SED.
.blank
.i 5;/PROG=_$command will cause the DCL command "command" to be
executed upon exiting. "Command" must not include any imbedded
blanks or any trailing qualifiers. For example, /PROG=_$DIRECTORY
will cause SED to execute the DCL DIRECTORY command upon exiting.
.blank
.i 5;/PROG=_@command__procedure will cause the DCL command procedure
"command__procedure" to be executed upon exiting. For example,
/PROG=_@SYS$COM:TMOUNT.COM will cause the TMOUNT command procedure in
the system command procedure library to be executed.
.b2.i-1;/QUICK
.b.i2;/QUICK
.i2;/NOQUICK##(D)
Controls the initial display of a file on the screen.
/QUICK suppresses the initial display of a file on your terminal's screen
after a DCL level SED command or a <SET-FILE> command.
This is useful on a slow terminal when you are not interested in what is
on the first page of the file.
/NOQUICK allows SED to display the first page of the file. This is the default.
.b2.i-1
/RAISE
.b.i2;/RAISE####(D)
.i2;/NORAISE
Controls how the <CASE> commands works, if /NOINVRT is set.
/RAISE tells <CASE> to change lower case letters to upper case.
/NORAISE tells <CASE> to change upper case letters to lower case.
.b2.i-1;/RCUR
/RCUR may be used with <SET-FILE>. It causes the current filespecs, rather than
the alternate specs, to be replaced by the given ones. Useful
for "keeping your finger" in one file (the alternate) while
looking at several others.
.b2.i-1
/READ
/READ makes the file read-only. /READ is the opposite of /WRITE.
.b2.i-1;/RECOV
.b.i2;/RECOV
.i2;/NORECOV##(D)
Controls whether SED starts a normal editing session, or reconstructs
a file using the journal
from an inadvertently (as in a system crash!) aborted SED session.
Typing SED/RECOV at DCL command level tells SED to recover the
previous editing session using the journal. See /JOURN.
.b2.i-1
/RESET
.b.i2;/RESET####(D)
.i2;/NORESET
Controls whether the starting nominals for parameters are reset after
each command.
/RESET causes the starting nominal parameters to be reset after each
command. Thus, <ENTER>5<INSERT-LINE><INSERT-LINE> will
insert 6 lines. This is the default.
/NORESET - do not reset starting nominal parameters after each command.
Thus, <ENTER>5<INSERT-LINE><INSERT-LINE> will insert 10 lines.
.b2.i-1
/RMAR
.b.i2;/RMAR=n##(D=80, usually)
/RMAR=n - Sets the right margin to be column n. Default is the width of
the screen (usually 80).
.b2.i-1
/ROLL
.b.i2;/ROLL####(D)
.i2;/NOROLL
Controls what happens when you type <RETURN> on the last line of the screen.
/ROLL causes the text on the
screen to roll one line
if the cursor is at the bottom of the screen and you type <RETURN>.
/NOROLL causes the cursor to move to the top of the screen
if the cursor is at the bottom of the screen and you type <RETURN>.
The text on the screen does not roll.
.b2.i-1
/SAVE
.b.i2;/SAVE=n
.i2;/NOSAVE##or##/SAVE=0##(D)
Causes an incremental save of your file every n characters of
typein. Default is n=0 (i.e., no incremental saves).
/ISAVE and /SAVE can be used together. When the counter for either one
reaches its limit, the file is saved, and both counters are reset.
.b2.i-1
/SCROLL
.b.i2;/SCROLL
.i2;/NOSCROLL##(D)
Controls what happens when you type <CURSOR-DOWN> on the last line of the
screen or <CURSOR-UP> on the first line of the screen.
/SCROLL causes the text on the screen to scroll one line
if the cursor is at the bottom (or top)
of the screen and you type <CURSOR-DOWN> (or <CURSOR-UP>).
/NOSCROLL causes the cursor to wrap around on the screen
instead of scrolling any text.
For example, a <CURSOR-DOWN> on the last line of the screen moves the cursor
to the first line of the screen. Likewise, a <CURSOR-UP> on the first line
of the screen moves the cursor to the last line of the screen.
This is the default.
.b2.i-1
/SHOW
.b.i2;/SHOW
.i2;/NOSHOW##(D)
Controls the display on your screen while <EXECUTE> is working.
/SHOW causes the effects of an <EXECUTE> command to be displayed
while it is working.
/NOSHOW updates the screen only when the <EXECUTE> is done.
This is the default.
.b2.i-1
/SLIDE
.b.i2;/SLIDE=n##(D=8)
.i2;/NOSLIDE
Controls the <SLIDE-LEFT> and <SLIDE-RIGHT> commands.
/SLIDE=n enables the <SLIDE-LEFT> and <SLIDE-RIGHT> commands. If the
optional value n is specified, is sets the default number of
columns to slide (or to /RESET to). The starting default for n
is 8.
/NOSLIDE disables the <SLIDE-LEFT> and <SLIDE-RIGHT> commands.
/SLIDE=0 is equivalent to /NOSLIDE.
.if old
.b2.i-1
/STRIP
/STRIP causes SOS line numbers to be stripped from the file when it is
read in. /NOSTRIP just marks the file read-only. There is no default for
this switch.
.ei old
.b2.i-1
/TABS
.b.i2;/TABS
.i2;/TABS=n##(D=8)
.i2;/TABS=W or /NOTABS
.i2;/TABS=S
Controls the way <TAB> and <BACKTAB> move.
/TABS makes <TAB> and <BACKTAB> use the usual tab positions.
/NOTABS or /TABS=W sets up word-wise TABS.
/TABS=n sets up tab stops every n positions
(clears all previously set tabs first). The default is /TABS=8.
For additional tailoring of tab stops, use /TSET.
/TABS=S restores all previously set tabs (including /TSET ones).
(This option is useful after /TABS=W.)
.b2.i-1;/TERM
.b.i2;/TERM=type
/TERM=type allows the user to specify the type of terminal he/she is
using. The qualifier may be specified as part of the SED command at
DCL command level or it may be included in the SED.INI file.
If SED cannot determine
your terminal type, and /TERM is not present on the command line or
in the initialization file, the editor will check for the logical
name SED__TERMINAL which should be equated to your terminal type using
the abbreviations for various terminals listed below. This logical can
also be equated to your terminal type in the LOGIN.COM file.
If after checking for the above settings, SED
still cannot determine your terminal type, it will use the default
system log-in setting which can be seen by using the
DCL command "SHOW TERMINAL."
The "type" on the /TERM qualifier can be VT100, VT52, or FT1 (Televideo 910),
INF200 (Infoton 200), RAM6211 (Ramtek 6211 graphics terminal), Visual 200
configured in VT52+ mode (VIS200).
.if old
"type"
can be: ADD580 (ADDS Consul 580), B100 (Beehive B100), BEE2
(Beehive MiniBee 2), INF200 (Infoton 200), REG100 (ADDS Regent
25, Regent 100, or Viewpoint), TLV910 (Televideo 910), TLV950
(Televideo 950), VIS200 (Visual 200 in VT52+ mode), VT52 (DEC
VT52), or VT100 (DEC VT100). This switch is usually unnecessary
if you declare your terminal type to the operating system with
the "TERMINAL type" command. See the "SPECIAL NOTES" section in
this document.
.ei old
.require "Rno:TopicEnd"
.!----------------------------------------------------------------------
.if old
SPECIAL NOTES -- Specifying Your Terminal
SED configures itself automatically for your terminal, according to the
type of terminal the operating system believes you are using. If you are
connected to the DEC-10 via a patchable port or a telephone modem, the
operating system won't know what kind of terminal you have. In that
case, issue a TERMINAL command to declare your terminal type. The
command is:
TERMINAL name
where "name" is one of the following:
B100 - Beehive B100 terminal
BEE2 - Beehive MiniBee 2 terminal
DM3000 - Datamedia Elite 3000
INF200 - Infoton terminal
REG100 - ADDS Regent 100, Regent 25 or Viewpoint
[For an ADDS Consul 580, use SED's /Z=ADD580 switch]
TLV910 - Televideo 910 terminal
TLV950 - Televideo 950 terminal
VT52 - Visual 200 (in VT52+ mode)
[For a real DEC VT52, use SED's /Z=VT52 switch]
VT100 - DEC VT100 terminal
You can also explicitly specify the terminal you are using with SED's /Z
switch. See the earlier section of this summary entitled "SWITCHES."
SPECIAL NOTES -- Terminal Peculiarities
As mentioned earlier, SED commands are executed by typing control
characters and (depending on the terminal) either escape sequences or
function keys. The commands are assigned to the same keys on all
terminals with (of course) a few exceptions. Those exceptions are:
/Z=name Key Does Instead of So use
------- ------ ----------- ---------- ------
ADD580 CTRL-@ nothing RECALL ESC A
rubout CURSOR-LEFT RESET ESC Z
B100 CTRL-@ nothing RECALL ESC A
TLV910 CTRL-^ CURSOR-HOME SLIDE-LEFT ESC L
TLV950 CTRL-^ CURSOR-HOME SLIDE-LEFT ESC L
Remember too that on some terminals (Visual 200, DEC VT52 and VT100) the
commands normally assigned to escape sequences are reassigned to
function keys. This is purely for convenience, since it's easier to
press a single function key than to type a two character escape
sequence. Check the appropriate keyboard "map" (see the "SPECIAL NOTES
-- Terminal Summaries" section) for the location and assignment of func-
tion keys.
There are a few exceptions to the default switch settings. /RESET/NOICR
is the default if your project number is less than 100. /NOHELP is the
default on Visual 200 terminals.
SPECIAL NOTES -- Terminal Summaries
The following paragraphs summarize the differences and exceptions that
apply to your terminal.
ADDS Consul 580
Uses all standard control character assignments except that the
terminal cannot send the CONTROL-@ code (use ESCAPE,A for RECALL).
Also the terminal cannot send the DELETE code: when you press RUBOUT,
it sends CONTROL-H instead (use ESCAPE,Z for RESET). Note that this
terminal does not have lower case characters. Note also that the non-
alphabetic control characters require you to press both the CONTROL
and SHIFT keys. Uses the standard escape sequence assignments (does
not have function keys). See DOC:SEDA58.KYS for a complete keyboard
map.
ADDS Regent 25
Uses all standard control character assignments. Uses the standard
escape sequence assignments (function keys are not used). See
DOC:SEDR25.KYS for a complete keyboard map.
ADDS Regent 100
Uses all standard control character assignments. Uses the standard
escape sequence assignments (function keys are not used). See
DOC:SEDRG1.KYS for a complete keyboard map.
ADDS Viewpoint
Uses all standard control character assignments. Uses the standard
escape sequence assignments (function keys are not used). See
DOC:SEDVPT.KYS for a complete keyboard map.
Beehive B100
Uses all standard control character assignments except that the
terminal cannot send the CONTROL-@ code (use ESCAPE,A for RECALL).
Uses the standard escape sequence assignments (function keys are not
used). See DOC:SEDB10.KYS for a complete keyboard map.
Beehive MiniBee 2
Uses all standard control character assignments. Note that this
terminal does not have lower case characters. Note also that the non-
alphabetic control characters require you to press both the CONTROL
and SHIFT keys. Uses the standard escape sequence assignments (does
not have function keys). See DOC:SEDBE2.KYS for a complete keyboard
map.
Datamedia Elite 3000
Uses all standard control character assignments. Uses the standard
escape sequence assignments (function keys are not used). See
DOC:SEDDM3.KYS for a complete keyboard map.
SED Summary Page 12
DEC VT52
Uses all standard control character assignments. Uses the keypad and
function keys near the keypad instead of escape sequences. See
DOC:SEDV52.KYS for a complete keyboard map.
DEC VT100
Uses all standard control character assignments. Uses the keypad and
function keys near the keypad instead of escape sequences. See
DOC:SEDV10.KYS for a complete keyboard map.
Infoton 200
The LINE and PAGE buttons MUST be ON. Uses all standard control
character assignments. Uses the standard escape sequence assignments
(no special function keys). See DOC:SEDIN2.KYS for a complete
keyboard map.
Televideo 910
Uses all standard control character assignments except that CONTROL-^
does CURSOR-HOME. (Use ESCAPE,L for SLIDE-LEFT.) Uses the cursor
mover keys (next to the space bar). Uses the standard escape sequence
assignments (function key function of keypad is not used). The key
labelled BACKTAB does the INSERT-MODE command. See DOC:SEDT91.KYS for
a complete keyboard map.
Televideo 950
Uses all standard control character assignments except that CONTROL-^
does CURSOR-HOME. (Use ESCAPE,L for SLIDE-LEFT.) Uses the cursor
mover keys (next to the space bar?). Uses the standard escape
sequence assignments (function keys are not used). The key labelled
BACKTAB does the INSERT-MODE command. See DOC:SEDT95.KYS for a
complete keyboard map.
Visual 200
The Visual 200 terminal should be in VT52+ emulation mode. Uses all
standard control character assignments. Uses function keys instead of
escape sequences. Uses the keypad as function keys if /KEYPAD switch
is given. Since the keys on this terminal automatically repeat when
held down, getting HELP by typing ENTER ENTER has been disabled
(/NOHELP). (So you don't get help "accidently" when you hold the F0
or ESCAPE key down too long!) See DOC:SEDVS2.KYS for a complete
keyboard map.
SED Summary Page 13
SED DOCUMENTATION
For more information about SED, see
HLP:SED.HLP This help file.
DOC:SED.MAN An easy reading SED tutorial.
DOC:SED.DOC Complete documentation about SED.
You can also get help while running SED. Just type the HELP command
(function key F9 on a Visual 200, for example).
[End of SED.HLP]
.ei old
.!----------------------------------------------------------------------
.b2.i-1
/TSET
.b.i2;/TSET=n
.i2;/NOTSET=n
Sets or clears a tab stop.
/TSET=n sets a tab stop at column n on the screen.
/NOTSET=n can be used to clear the tab (if any) at column n on the screen.
.b2.i-1
/UPPER
.b.i2;/UPPER
.i2;/NOUPPER##(D)
Controls whether lower case typein is converted to upper case.
/UPPER causes all alphabetic characters to be converted to upper case.
This is useful on a terminal whose shift lock shifts all characters,
like the VT100.
/NOUPPER leaves characters in whatever case you type them. This is the default.
.b2.i-1
/WIDTH
.b.i2;/WIDTH=n##(D=80, usually)
/WIDTH=n causes SED to think the terminal is n characters wide. Good for
terminals which can change their widths, like the VT100. (The VT100
has both 80 and 132 column display modes.)
The default is the current width of your screen (as shown by the DCL command
"SHOW TERM/WIDTH"), which is usually 80.
.b2.i-1
/WRITE
.b.i2;/WRITE##(D)
.i2;/NOWRITE (same as /READ)
Controls whether you can change the contents of the file you are looking at.
/WRITE allows the current file to be altered. This is the default.
/NOWRITE (which is the same as /READ) makes commands
which change the file become illegal, so the file cannot be
modified accidentally.
.b2.i-1;/X
.b.i2;/X=NAME=txt
/X=NAME=txt is used in SED.INI to set up an execute buffer named NAME
with contents txt.