Trailing-Edge
-
PDP-10 Archives
-
SRI_NIC_PERM_SRC_3_19910112
-
stanford/5-swskit/se.hlp
There is 1 other file named se.hlp in the archive. Click here to see a list.
Help for SE
SE (for Super-editor) is a bit of hackery designed for those who do
not trust/do not have time to learn EMACS (the designer falls into the
former category, and holds the opinion that no editor should be smarter
than its user). It works on VT52's and VT100's (in VT52 mode).
SE is interpreted by a somewhat hacked version of TV, which is in
turn a somewhat hacked version of TECO, which is in turn... It will not
run under normal TV.
It is intended for the VT100 keyboard, and most closely resembles
VTEDIT, from the land of 11 processers. The most common commands are on
the number pad and arrows, and all text characters are self inserting.
Control characters have meaning as commands, as does ESCape followed by
various symbols.
To insert a character you simply type it. Commands exist to move
the cursor ahead, back, up, down, by characters, words, or lines. With
just these commands much simple text editing can be done.
However, no one does simple editing, and the list of commands that
follows reflects this fact. All the "dangerous" commands (ie., type the
command by accident and the results could be disasterous; TECO lovers
refer to such commands as "underscore" commands), are grouped together
and are reached by first typing a ^Y or ESCape-Y. Relax; this editor
makes it HARD to mess yourself up.
A few notes on the command structure. Those who know EMACS or
VTEDIT will probably feel at home with the way the commands are laid
out, and to the rest of you, don't worry, its rather simple.
In general, ESCape-symbol and Control-symbol are the same command.
That is, ESCape-A and control-A do the same thing. The ESCape convention
exists because some control characters are rendered unto the TOPS-20
monitor and related, for example, ^C. Also, there are characters that
cannot be sent when the control key is held down (like "%"), but many of
the more obscure commands are reached by typing ESCape-funny-character.
Many commands have two flavors, Normal form and Modified form.
Usually, modified form means that the command does something slightly
different that normal. A command is Modified by preceeding it with an
ESCape. For instance, ESCape-S is the search command, and
ESCape-ESCape-S is the Modified search command. The modified search
command searchs backwards. It will be noted by the VT100 lovers out
there that a VT100 in VT52 mode sends an ESCape-S sequence when the PF4
key is hit, and yes, this sort of thing will work here.
The only other complication is the concept of putting numeric args
on commands: ie., search for the 5th occurance of some string. You can't
simply type the numeric arg from the number pad, since these are all
interpreted as commands, and the characters on the number row will
simply insert themselves if you type them. The time honored solution is
this: to make a command happen several times in a row, type ESCape
followed by the number followed by the command. That is, "ESCape 5
ESCape S" means "search 5 times..." It is important to note that a
command with a numeric argument so added is not considered a Modified
command, even though it does have a leading ESCape - put differently, a
Modified command is one in which a numeric arg was indicated but none
was typed. Final note - SE can't tell the difference between
ESCape-zero-command and ESCape-command - that is, if you specify a
numeric arg of zero, the editor assumes you meant the modified form of
the command.
A reasuring note: if you get halfway into a command, and realise
its the wrong command you've typed, typing a rubout will get you back to
the command prompt. A rubout by itself, though, is a command (it deletes
the character before the cursor).
That is the entire command structue of SE. There are very few
exceptions, and the few that there are will be noted below.
An explanation of the mode line follows. Here is a sample one:
2: 17%M+U January 8, 1982 12:49PM ( 7.30) [TSG:<FOO>BAR.MUNGE]
This example has the Time-after-command option on. If you don't
like it you can turn it off (see the $O command). The first number is
the buffer number - which of the 20 buffers, 0 to 19, you are editing
in. The next piece of information, 17%, is how far into the buffer the
point is - 17% in this case.
This is followed by the flags string. There are lots of
possibilities here, and they are delatled below.
M+ the mark is set and you are past it.
M- the mark is set and you are before it.
@ The mark is set and you are at it.
U Update mode is on; the buffer will be written to the file
if you change it and pause for more than 5 seconds.
Ap Autoparasite mode is on. The parasite package will be run
whenever you type a carriage return or linefeed.
* The buffer has been written out to the file, and no changes
have occured to it since. Or, SE would have written the buffer
if it had a filename to use in the modeline. In the latter cse
it complains, and this indicator is lit to prevent SE from
trying to write the file every 5 secs.
L Load after exit mode is on.
P Preempt keys mode is on.
Ba Backward browse mode is on.
Ta Tab is inserted after Newline (via K0) is typed.
T There are tour points set.
C Copy-on-text-store is on.
O Overwrite character mode is on.
After this, if time-on-command is on, the date, time and load
average is displayed. Then comes an open-square bracket, and the
filename associated with the buffer. If no filename has ever been set,
this will probably say ";Virgin". Some commands set this implicitly
(^Y%, ^YNname$), ans some change it (^YQ sets it to ;Quamped, for
example). The buffer name has a real meaning, aside from helping you
remember what is in each buffer. It is the filename used by the exit
command (^X), and the filename used if you have auto-Update mode on. If
the text in the modeline buffer name begins with a semi-colon, it will
not be used as a filename. Trying to set a null buffer name will cause
SE to set it to ";Noname". Note that if auto-update mode is on, but
there is no filename set in the modeline, the update attempts will fail
harmlessly with a message like "no file to write to, update ignored."
You should either set a modeline name (with ^YN) or turn off auto-update
($OU ).
The last thing on the mode line may be a "?", which means that the
last command done failed somehow.
There are a few other things to get used to in this editor; again,
many of these will be familiar to users of other screen editors. In
general, wherever the cursor (/\) is is called the point, and most
commands have their effect at the point. But there is also a second
"point", called the mark, which is set by the user (see the K8 command),
or by certain commands. The mark is just a location in the buffer that
SE keeps track of. You can set it, move around in the buffer, and get
back to the mark (see the K, command). More importantly, several
commands work on a set of characters between the point and mark. To
delete a large block of text, for instance, you would move to the
beginning of it, set the mark there (K8), get to the end of what you
wanted deleted, and Type Modified-K ($$K). Everything between point and
mark is erased.
There is also something called the tour stack. It is of dubious
usefulness, but some people (like the designer of SE) like it. It is
simply a FILO stack of marks, and commands exist to push the point onto
the stack, and pop as well. Its great use is in following subroutine
calls in programs; you can set a tour point (as they are called) at the
subroutine call, go find the subroutine, look at it, find a call is IT
that you want to look at, set another tour point there, ... and so on,
levels deep. Popping Tour points off sends you skipping back to where
you set the tour points, in reverse order. However please note this
WARNING: Tour points are prone to something called drift. Unlike the SE
Mark, which stays where you set it even if you alter the buffer, making
changes to the buffer is likely to make Tour points wander from where
you set them. And, Tour points are not kept for each buffer - there is
only one Tour stack, so the stack becomes meaningless if you switch
buffers. Despite all this it has uses. And SE has one quirk concerning
tour points that is very useful. If any tour points are on the stack,
Exit-type operations will fail with an error message (Tour points still
set). So, if there is something in a buffer that you want to remember to
get back to, set a tour point there. Having any points on the stack will
cause a T to be displayed in the modeline as an added reminder.
Last note, on conventions in the below list: capital-K-something
means a Keypad character. Ie, K5 is the five key on the keypad, and
Kenter is the Enter key on the keypad. PFn means the PF keys above the
keypad; PF1, Pf2, etc.
--------------------------------SE command set--------------------------
Command What is does
~1
$A ESCape-A (or control-A or the Uparrow key) will move the cursor
up one line. Modified-A will send the cursor up 20 lines, at the
left margin.
~*~2
$B or Downarrow sends the cursor down one line. Modified-B sends the
cursor down 20 lines.
~*~3
$C or rightarrow sends the cursor one character to the right.
Modified-C sends the cursor to the end of the current line.
You canNOT type this command as ^C for obvious reasons.
~*~4
$D or left arrow moves the cursor back one character. Modified-D moves the
cursor to the beginning of the current line.
~*~5
$E allows you to type delimiter-TV commands-delimiter and have
them executed. Modified-E repeats the last TV commands done with $E.
~*~6~-8
$F or K3 moves the cursor forward one word. Modified-F sets the mark
to where you are and then moves the cursor.
~*~7
$G insert back the last deleted text. This can be done up to nine
times. Note that while most commands that delete text store it
in such a way that $G can get it back, a few (like ^YK) do not.
Modified-G puts the cursor back where it was after the text is
restored (Normal-G leaves the cursor after the restored text).
The control-G form of this command will NOT work; ^G is an
interrupt character to TV, and will abort anything that is
happening at the moment, dumping you off at TV command level.
~*~8~-6
$H or backspace or K1 will move you back one word (K1 and K3 move
in oppsite directions). The modified forms will set the mark first
and then move the cursor.
~*~9
$I enter rapid insert mode. You type delimiter-text-delimiter,
and the text is inserted. This is considerably faster than SE's normal
method of character insertions, but no SE commands are available
during rapid insert mode execpt rubout. Modified-I inserts the last
rapid-inserted text in place, which can be very useful. Note that
control-I does not do this; control-I is the tab key, and tabs are
self-inserting.
~*~10
$J this inserts a <CR><LF><TAB>. Useful for creating Macro programs.
Modified-J inserts the following (without the quotes) "
SEARCH MONSYM,MACSYM
ST: JFCL
RESET
"
~*~11
$K usually typed as a ^K. This deletes one line, a la the TV K command.
Modified-K deletes the text from point to mark. The TV command
0K is not done with the K command; see the ^U command.
~*~12
$L usually ^L. This clears and retypes the screen. Modified-L
centers the cursor on the screen and then refreshes the screen.
If given a numeric arg, the cursor is moved by that many lines
and then the screen is refreshed.
~*~13
$M jump to current mark. Modified-M exchanges the current point and mark.
The control form of this command will not work; it is a carriage
return, which is self inserting.
~*~-1
K, jump to current mark. This command has no modified form. VT52's
don't have this key, and those users are referred to the $M command.
~*~14
$N or ^N. This inserts a newline (<CR><LF>), then backs over it.
This is a good way to add lines to the middle of a file - you
can see what you are doing. Modified-N inserts 23 lines and backs
over them.
~*~15
$O the flags command. SE doesn't have very many strange modes, but it
has some, and they are turned on and off with this command. A
flag is turned on by giving the command a numeric arg of 1 and
turned off by giving no numeric arg at all. The Modified-O command
turns off ALL flags. The modes all have one character names and
these are specified after the O. To stop typing in mode names,
type a space.
A Turn on Autoparasite mode. If you define a parasite
package (in qreg P), it will be run whenever you type
a linefeed (or carriage return) if this mode is on.
This is good for functions you want done often as you are
typing in lines, or for counting lines as you
type; but its especial use is for the JUSTify parasite package
which justifies text as you type it.
Related: ^YP ^YD.
B Backward browse mode. This interchanges the effect of the
Kenter command and the ESCape-space command.
C Copy-on-store mode. This causes the K5 command to store
text as normal, but not to remove it from the buffer. See K5.
T Type the time+load average as part of the mode line.
O Overwrite mode. This causes self-inserting characters to
overwrite the character after the cursor, instead of being
inserted before it. carriage returns are treated specially;
a carriage return brings you to the beginning of the next line
in this mode. If you are at the end of a line, self-inserting
characters simply insert - you cannot overwrite an existing
carriage return.
S Space-after-newline mode. A misnomer; this mode causes a tab
to be inserted after you type a Newline (K0). Occasionally
useful for lists or Macro programs.
L Load-after-exit mode. This causes files with certain extensions
to be handled specially at exit time. .MACs are LOADed, .RNOs
are RUNOFF, .LSTs are printed, Etc. .TEC is special here:
"loading" one sets it up as the parasite package. If the
escape-dollarsign command is used and given a non-zero arg,
the parasite package is then run.
P Preempt-key-mode. This is used for VT52 terminals. It has the
effect of making the K7 key do the search command (since VT52s
don't have the PF4 key, the normal search key), and the PF1 key
do the repeat search command.
U Update-on-pause. If you stop typing for over 5 seconds, SE
will write the current version of the buffer to the open file
if changes have been made to the buffer.
? Type the possible characters.
<sp> end the list of modes to set/unset.
~*~16
$P or PF1. Pop to the top tour point. Modified-P clears the tour stack.
Note: in peeempt mode (see $O), this is the repeat search key.
~*~17
$Q or PF2. Delete the next character (the opposite of rubout).
The modified-Q command is illegal.
~*~18
$R or PF3. Do a Replacing search. The text you specify (ending with
EScape) is found and removed.
~*~19
$S or PF4. Search. You follow the command with the text to be
searched for, ended with an EScape. Failing searches do not move
the cursor and do trigger the illegal command reaction.
~*~20
$T push the point onto the Tour stack. Modified-T pushes the
mark onto the stack.
~*~21
$U usually ^U. If not at the beginning of the line, delete back
to the beginning of the current line. If already at the beginning,
erase the last line. Modified-U erases from the point to the
end of the current line, but does not erase the <CR><LF>
at the end of the line (the way ^K would).
~*~22
$V usually ^V. This has various forms. Alone, the next character typed
is inserted literally. Ie, ^V^A inserts a control-A. If given
a numeric arg, the character with the ascii value given is inserted.
Modified-V inserts an EScape.
~*~23
$W usually ^W. Alone, this toggles the case of the next character (if
it is a letter) and in any case moves over one character. The
Modified form forces upper case on all letters from point to mark.
With any numeric argument, it forces lower case on all letters from
point to mark.
~*~24
$X often ^X. This forces the file to be written out. The Normal form
then exits (a continue will work). Modified form does not exit.
Note - if Load-after-exit mode is on, both forms exit and do
approprate actions based on the file extension.
~*~25
$Y often ^Y. This is a gate character to "Y mode", a set of commands
that is very long, very useful, and somewhat dangerous. Note that in
all the below cases, numeric args or Modified form is specified on
the ^Y command itself, not after it. The command to be done is
noted by a single character following the Y. These follow:
% Read a file into a buffer. The buffer is specified by the numeric
argument (if none is given, 0 is assumed). The modified form
adds one to the current buffer number and uses that. If the specified
buffer not empty, SE asks "are you sure". It then prompts for
the file to be read, and reads it all in. The filename is set
in the mode line.
: take the text that follows, ended with an EScape, and discard
every line between point and mark that does not contain the text.
The discarded lines are NOT saved and canNOT be gotten back with
the $G command.
A set the point to the top and the mark to the bottom of the buffer.
The "all" command.
@ prompt for a filename, and insert the file's contents into the
buffer at the current point.
O wait for the next character, and insert the ascii value into the
buffer as a number (decimal). The modified form preceeds the
number with the characters "^D" (no quotes).
Q kill the buffer, clear the modeline name; and, in general,
trash the buffer. This should be done whenever a buffer isn't
needed anymore. The modeline name is cleared by setting it to
;QUAMPED
R search for the next typed character, and destroy everything
from the point to the occurance of the character.
S search for the next typed character. ^YS& feels faster than
$S&$ somehow.
T select buffer number <numeric arg>. If Update-on-pause mode is
enabled, this will update the old buffer before opening the
new one.
U count the number of lines from point to mark.
F kill everything outside of the point-mark range. The deleted text
canNOT be recovered.
K kill the buffer, but leave the modeline name alone.
L list the buffer names by number. You get the option of
switching buffers; to do so, type "/number-wanted<ESC>".
N Normal form: set the modeline name to the given text. If this
is null, set the name to ;NONAME. The modified form of this
command sets it to the last read or written filename.
I insert the contents of buffer number <numeric arg> into this
buffer at this point. You may not insert a buffer into itself
directly.
# This types the ascii value of the character after the cursor
in decimal and octal.
* Count the number of occurances of the given string,
from point to end.
= This types out the ascii decimal value of the next typed character
in decimal and octal.
; Remove all text before the first colon and first close-angle bracket
in the modeline filename.
B do a paranthetical balance operation based on the next typed
character and the next character in the buffer. The cursor
is left at the balancing point, or at the end if there isn't one.
D define a new autoparastie package. This prompts for a file,
stores it, and asks "Start?". Typing Y runs the package.
P run the parasite package. If a value is given, it is loaded
into the parasite-value location (see $<), and then the parasite
package is run.
? Type the list of possible responses in Y mode.
~*
End of Y-mode subcommands
~26
$Z usually ^Z. Exit to the Exec. If the tour stack is not empty,
this will fail. Modified-Z exits to TV. (typing MD$$ restarts
SE).
~*~-32
$<sp> move backwards about 20 lines. If reverse browse mode is on,
this moves forward about 20 lines.
~*~-31
$! update the screen and clean up the modeline area. Usually not
needed.
~*~-30
$" take the next typed character and insert it at the beginning
of the next <numeric arg> lines.
~*~-28
$$ ESCape-dollarsign. This turns on load-after-exit and exits,
writing the file out and doing the approprate to it (see
info on load-after-exit, under the $O command). Giving the
command a non-zero argument does various things differently.
.TEC files are not just loaded as the parasite package, but
also started; unrecognised extensions are not loaded, but
compiled.
~*~-27
$% jump to the <numeric arg> percent point of the file. Ie, $25%
jumps 1/4th of the way into the file (from the top).
~*~-26
$& fix the terminal. Useful if the terminal mode gets messed.
~*~-25
$' Normal form turns on trace mode in TV. This is useful for debugging
SE or parasite packages. Modified-' loads whatever is in the
buffer into qreg D, where SE lives, then exits to TV. This
is how a new version of SE can be set up.
~*~-24
$( take the given filename and execute the SE commands contained therein.
~*~-23
$) jump through the text a word at a time, displaying, until a space
is typed.
~*~-22
$* turn the "buffer-unmodified-since-last-update" flag off. This
internal flag controls whether the update-on-pause operation,
if turned on, has anything to do. This state is indicated by
the appearence of an "*" in the modeline. The flag is turned on
by Modified-* (or a sucessful auto-update operation, or a Modified-X
command).
~*~-20
$, exchange the two characters on either side of the cursor, then move
forward one character. Twiddle.
~*~-18
$. jump to where you were at the beginning of the last command.
~*~-17
$/ jump the screen up about 7 lines. If a numeric arg is given,
jump by that many lines. If this action drives the cursor from
the screen, the screen is refreshed.
~*~-15
Kenter move about one screen down. If backwards browse mode is on, this
moves about one screen up. Modified-Kenter will set the mark
to the current point if the mark has not yet been set, and then
move the point.
~*~-14
K9 jump to the top. Modified-K9 jumps to the bottom. If given a
numeric arg, this jumps <num arg> characters in from the top.
~*~-13
K8 set the mark. Modified-K8 interchanges the point and mark.
~*~-12
K7 set the tour point to point. If preempt mode is on, this is
the search command.
~*~-11
K6 information. This types out the number of lines in the buffer,
where the mark is, and so on. Modified-K6 just types out the number
of characters in the buffer.
~*~-10
K5 copy the text from point to mark to the cut/paste register.
This register can only hold one block of text at a time; it is not
a stack. This text can be inserted back at any point with the
Modified-K5 command. If copy-on-text-store mode is off, the
copied text is removed from the buffer when K5 is done.
If on, the text is copied but not removed.
~*~-9
K4 delete the last word in the buffer. Modified-K4 deletes the
next word in the buffer.
~*~-7
K2 move to the beginning of the previous line.
~*~-3
K. move to the end of the next line. Modified-K. moves to the end
of the previous line.
~*~-2
K_ repeat the last search. Modified-k_ repeats it backwards.
~*~-5
K0 move to the beginning of the next line. If there is no next
line, insert one.
~*~31
cntrl-? gives you this paragraph. Modified-^? gives you the whole
help text. <Numeric arg> ^? gives you the ability to type in a search
string and have the help file searched for pieces with that string.
(Known as a Apropros search). Also, cntrl-_.
~*~30
cntrl-tilde or cntrl-^. Wiggle the cursor back and forth until a space
is typed. Useful when you lose the cursor position!
~*~28
$\ insert the date and time into the buffer. Modified-\ just inserts
the date.
~*~27
$[ take the word before the cursor and search for the next occurence
of it in the buffer. Modified-[ finds the FIRST occurance in the
buffer.
~*~59
${ save the current buffer and all relevant information in a file
specified after the command. The default extension is .BUFFER.
The Normal form scraps the buffer after it is saved to disk;
the Modified form does not.
~*~61
$} take the given filename (def. ext is .BUFFER) and set up the
buffer from it. These files have a particular format and are
written by the ${ command. Destroys the current buffer contents.
~*~0
Rubout also $@. Delete the last character. The $@ form can accept
numeric args.
A rubout in the middle of a command generally aborts the command.
~*~60
$| patcher mode. This is used to insert patches into programs,
often Macro programs. The normal form takes a numeric arg
(if none is given, one is prompted for). This is the patch number
(also called edit number) to be applied to the buffer. From this
point on, lines are inserted and deleted using the following
commands:
^K delete the next line.
^U as normal, but will not get previous line.
<rub> as normal, but won't back across <CR><LF>'s.
^H insert ";[patch-number] " (without quotes).
$_ abort this patch attempt entirely.
^V insert next character literally.
^L refresh the screen.
$| finish the patch insert; do not count this line as
inserted (used when a "patch" consists entirely of
deleted lines.)
$<lf> finish the patch, counting this line. This is done
at the end of the last line to be inserted; the
ending CRLF isn't typed.
When the patch is in, this goes to the top of the patch and inserts
a hlper line, then sets the mark there, goes to the top of the
buffer, and allow you to type a history line.
The modified form uses the last patch number, and does not do the
history line. This is used for multiple part patches.
~*~-4
$< Takes the numeric arg and stores it where a parasite package
can find it. (uses qreg :74)
~*~32
$` grave key. This goes down <numeric arg> lines, deleting the
first character from each line. Used to undo $" commands.
~*~-21~62~-29
$# $+ $~ Those commands have not been defined yet.
~*~#
End of SE help.