[net.micro.amiga] Amiga EDIT ref card

hull@hao.UUCP (Howard Hull) (03/13/86)

I know this is ancient history for all you developer's kit subscribers and
registered developers, but for the rest of us, remember this from Kim?

>Message-ID: <236@mips.UUCP>
>Date: 23 Nov 85 10:04:07 GMT
>
>there is a full-screen editor in Amiga ... and a line-editor?  Yep, there
>surely are!  For the full-screen editor, just go into CLI, and type
>ED <filename>.  Bingo!  For the line-editor, you type EDIT <filename>
>(my short experiance with the *line-editor* is that <filename> must already
>exist, else you get an error).  The commands for ED were posted to the
>net some time ago in a reference-card form;...
>...
>e-mail it to them.  I don't have the commands for the line-editor ("q"
>actually "quits" it though).

and from Mike, with respect to the original AmigaTerm (now replacd by
PDTerm):

>Message-ID: <301@3comvax.UUCP>
>Date: 26 Dec 85 21:43:50 GMT
>
>I just thought I would let you guys know that Amigaterm has two major
>bugs that I know of, plus one decent enhancement that I have made.
>
>1.	XMODEM transfers work some of the time.
>...
>	when Xmodem is used to transfer source files, Amigaterm appends
>	nulls to the end of the file, which makes the source incompatable
>	with ED.  I wrote a program to strip these off, but EDIT on the
>	Amiga will strip them off, too.

Due to the benevolence of one of the developers, I finally got my hands
on a copy of the AmigaDOS User's Manual (presumably for v1.0).  I thought
that for the *unlikely* event that any of you may encounter a "File contains
binary" brushoff from ED (and since nobody has pushed the EDIT commands to
the net), I would exerpt the summary in ref card form for those bold enough
to experiment with it.  Keep in mind that there are 32 pages of instructions
on how to use it, and that this is a brief summary.
...the command syntax for EDIT is as follows:
   EDIT [FROM]<file>[[TO]<file>][WITH<file>][VER<file>][OPT Pn|Wn|PnWn]
The argument FROM represents the source file that you want to edit.  The
argument must appear, but the keyword itself is optional (that is, AmigaDOS
accepts the FROM file by its position).  It does not require you to type
the keyword FROM as well.
The TO file represents the destination file.  This is the file where EDIT
sends the output including the editing changes.  If you omit the TO argument,
EDIT uses a temporary file that it renames as the FROM file when editing is
complete.  If you give the EDIT command STOP, this renaming does not take
place, and the original FROM file is untouched.
The WITH keyword represents the file containing the editing commands.  If you
omit the WITH argument, EDIT reads from the terminal.
The VER keyword represents the file where EDIT sends error messages and line
verifications.  If you omit the VER argument, EDIT uses the terminal.
You can use the OPT keyword to specify options to EDIT.  Valid options are
P<n>, which sets the number of previous lines available to the integer <n>,
and W<n>, which sets the maximum line length handled to <n> characters.
Unless you specify otherwise, AmigaDOS sets the options P40W120.  You can
use the OPT keyword to specify options to EDIT.  Valid options are P<n>,
which sets the number of previous lines available to the integer <n>, and
W<n>, which sets the maximum line length handled to <n> characters.  Unless
you specify otherwise, AmigaDOS sets the options P40W120.  You can use
OPT to increase, or decrease, the size of available memory.  EDIT uses P*W
(that is, the number of previous lines multiplied by the line width) to
determine the available memory.  To change the memory size, adjust the P and
W numbers.  P50 allocates more memory than usual; P30 allocates less memory
than usual.  Note that unlike ED, you cannot use EDIT to create a new file.
If you attempt to create a new file, AmigaDOS returns an error because it
cannot find the new file in the current directory.

----------------------------------------
EDIT	Quick Reference Card	EDIT
----------------------------------------
This card uses the listed abbreviations:
Notation	Description
 qs		Qualified string
 t		String
 sw		+ or - (on or off)
 n		Line number, or . or *
		 (current and last line)
----------------------------------------
Character Pointer (Line Window) Commands
----------------------------------------
Command	Action
 <	Move char pointer left
 >	Move char pointer right
 #	Delete char at pointer
 $	Lower case char at pointer
 %	Upper case char at pointer
 _	Turn char at pointer to space
 PA qs	Move char pointer to after qs
 PB	Move char pointer to before qs
 PR	Reset char pointer to
	 start of line
----------------------------------------
	  Positioning Commands
----------------------------------------
Command	Action
 M n	Move to line n
 M +	Move to highest line in memory
 N	Next line
 P	Previous line
 REWIND	Rewind input file
----------------------------------------
	    Search Commands
----------------------------------------
Command	Action
 F qs	Find string qs
 BF qs	Same as F, but move backward
	 through file
 DF qs	Same as F, but delete lines
	 as they are passed

----------------------------------------
	   Text Verification
----------------------------------------
Command	Action
 ?	Verify current line
 !	Verify with char indicators
 V sw	Set verification on or off
 T	Type to end of file
 T n	Type n lines
 TL n	Type n lines with line numbers
 TN	Type until buffer changed
 TP	M-, then type to last line
	 in buffer
----------------------------------------
     Operations on the Current Line
----------------------------------------
Command	Action

A qs t	Place string t after qs
AP qs t	Same as A, but move char pointer
B qs t	Place string t before qs
BP qs t	Same as B, but move char pointer
CL t	Concatenate current line,
	 string t, and next line
D	Delete current line
DFA qs	Delete from after qs
	 to end of line
DFB qs	Delete from before qs
	 to end of line
DTA qs	Delete from start of line
	 to after qs
DTB qs	Delete from start of line
	 to before qs
E qs t	Exchange string qs with string t
EP qs t	Same as E, but move char pointer
I	Insert material from terminal
	 before line
I t	Insert from file t
R	Replace material from terminal
R t	Replace material from file t
SA qs	Split line after qs
SB	Split line before qs

----------------------------------------
		Globals
----------------------------------------
Command	Action
GA qs t	Globally place t after qs
GB qs t	Globally place t before qs
GE qs t	Globally exchange qs for t
CG n	Cancel global n
	 (all if n omitted)
DG n	Disable global n
	 (all if n omitted)
EG n	Enable global n
	 (all if n omitted)
SHG	Display info on globals used
----------------------------------------
	Input/Output Manipulation
----------------------------------------
Command	Action
FROM	Take source from original
FROM t	Take source from file t
TO	Revert to original destination
TO t	Place output lines in file t
CF t	Close file t
----------------------------------------
	    Other Commands
----------------------------------------
Command	Action
'	Repeat provisions
	 of A, B or E command
=n	Set line number to n
C t	Take commands from file t
H n	Set halt at line n.
	 If n=* then halt and unset h
Q	Exit from command level;
	 windup if at level 1
SHD	Show Data
STOP	Stop
TR sw	Set/Unset trailing space removal
W 	Wind up
Z t	Set input terminator to string t
----------------------------------------
								Howard Hull
[If yet unproven concepts are outlawed in the range of discussion...
                   ...Then only the deranged will discuss yet unproven concepts]
        {ucbvax!hplabs | allegra!nbires | harpo!seismo } !hao!hull