;
;	copyright (C) 1981 1982
;
;	by Brian Nelson
;
;
; source file of HELP for VT command
;
; create:
;
;	(rsts)
;
;	  run $libr.sav
;	  sy:xcvt10.hlb=vt100.src/m
;	  ^Z
;
;	  pip edrt:<40>/mo:16=xcvt10.hlb
;
;
;	(rt11)
;
;	  run libr
;	  xcvt10.hlb=vt100.src/m
;	  ^C
;
;
;	(rsx)
;
;	  sorry, find a RSTS or RT system to do it on.
;
;
.MACRO KEYPAD
$(0$(0\
GOLD A  SET LEFTMARGIN		lqqqqqqqwqqqqqqqwqqqqqqqwqqqqqqqk
GOLD F  EXIT			\
x$[7m PF1   $[0mx PF2   x PF3   x PF4   x
GOLD G	INSERT DISK FILE	\
x$[7m GOLD  $[0mxNXTPAGExFNDNEXTxDELLINEx
GOLD M  ENTER SETUP MENU	\
x$[7m       $[0mx$[7mLASTPAG$[0mx$[7m FIND $[0m x$[7mUNDELL$[0m x
GOLD P	FILL PARAGRAPH		xqqqqqqqxqqqqqqqxqqqqqqqxqqqqqqqx
GOLD R	REVERSE LINE		x  "7"  x  "8"  x  "9"  x  "q"  x
GOLD S	SAVE FILE		xFNDLASTxSWAPCHRx APPENDxDELWORDx
GOLD W	WRITE SELECT		\
x$[7mSEARCHB$[0mx$[7mSWAPLIN$[0mx $[7mSPCINS$[0mx$[7mUNDELW$[0m x
CTRL/A	EXIT			xqqqqqqqxqqqqqqqxqqqqqqqxqqqqqqqx
CTRL/D	DELETE LINE		x  "4"  x  "5"  x  "6"  x  ","  x
CTRL/E	EXECUTE MACRO		x BOTTOMx TOP   x PASTE xDELCHARx
CTRL/F	NEXT WORD		\
x$[7m FILL$[0m  x$[7m CENTER$[0mx $[7mZAPSEL$[0mx$[7mUNDELC$[0m x
CTRL/G	UNSAVE LINE		xqqqqqqqxqqqqqqqxqqqqqqqxqqqqqqqx
CTRL/P	REPRINT PAGE		x  "1"  x  "2"  x  "3"  x"ENTER"x
CTRL/U	ERASE LINE		x WORD  x EOL   x CUT   x       x
CTRL/V	SET PARAMETERS		\
x$[7mLSTWORD$[0mx$[7m DELEOL$[0mx$[7m CHCASE$[0mx       x
CTRL/W	SAVE LINE		xqqqqqqqqqqqqqqqxqqqqqqqx       x
CTRL/X	READ MACRO		x BEGINLINE     x SELECTxREPLACEx
CTRL/Y	REPRINT LINE		\
x$[7m INSLINE       $[0mx$[7m INSOFF$[0mx$[7mSETPAT $[0mx
BACKSP  EOL/START OF LINE	mqqqqqqqqqqqqqqqvqqqqqqqvqqqqqqqj
$(B$(B\
.ENDM
.MACRO UP
$[7m\
$[1m     Cursor up ("Uparrow" key)$[0m
$[7m
          Cursor Up    - Moves the cursor up one line.


$[1m     Pagetop (PF1 + "Uparrow")$[0m
$[7m
          Hitting the 'GOLD' key and then the Uparrow key  moves
          the cursor to the top of the page.
$[0m\
.ENDM
.MACRO DOWN
$[1m$[7m     Cursor down ("Downarrow" key)
$[0m$[7m
          Cursor Down  - Moves the cursor down one line.


$[1m$[7m     Pageend (PF1 + "Downarrow")
$[0m$[7m
          Hitting the 'GOLD' key  and  then  the  Downarrow  key
          moves the cursor to the bottom of the current page.
$[0m\
.ENDM

.MACRO LEFT
$[1m$[7m     Left ("Leftarrow" key)
$[0m$[7m
          Cursor Left  - Moves the cursor left by one  character
          position.
$[0m\
.ENDM

.MACRO RIGHT
$[1m$[7m     Right ("Rightarrow" key)$[0m
$[7m
          Cursor Right - Moves the cursor right by one character
          position.


$[1m$[7m     Sentence (PF1 + "Rightarrow")$[0m
$[7m
          If the Rightarrow key is pressed following the  'GOLD'
          key,  the  cursor is moved forward through the file by
          sentences.   (A  sentence  is  defined  as  a   period
          followed by any non-alphanumeric character.)
$[0m\
.ENDM

.MACRO ZERO
$[1m$[7m     Begin line ("0")$[0m
$[7m
          Typing the '0' key when in keypad mode  will  cause  a
          cursor to move to the start of the current line.


$[1m$[7m     Break line (PF1 + "0")$[0m
$[7m
          The '0' key, when preceeded by the 'GOLD' key,  causes
          a CR/LF to be inserted at the current cursor position.
$[0m\
.ENDM

.MACRO ONE
$[1m$[7m     Word ("1")$[0m
$[7m
          The '1' key will move the cursor to the next word (see
          ^F).


$[1m$[7m     Lstword (PF1 + "1")$[0m
$[7m
          The '1' key, when preceeding by typing the 'PF1'  key,
          will  cause  the  cursor  to  move  to  the end of the
          previous word (see ^R).
$[0m\
.ENDM

.MACRO TWO
$[1m$[7m     Eol ("2")$[0m
$[7m
          The '2' key moves the cursor to the end of the current
          line.


$[1m$[7m     Deleol (PF1 + "2")$[0m
$[7m
          Deletes from cursor to the end of the  line.   Entered
          as PF1 2.  (GOLD 2)
$[0m\
.ENDM

.MACRO THREE
$[1m$[7m     Cut ("3")$[0m
$[7m
	The  '3'  key  starts the marking of lines for saving in the
	paste buffer. Lines are  marked  by  then  typing  the  down
	arrow  key  until  the  last line to be saved is passed. The
	'.' key is then typed to actually save the lines. The  lines
	are then retrieved by typing the '6' key. 
	This  key is also used to start a select range to be used by
	various other commands, such as DELLINE, GOLD Q  and GOLD W.

$[1m$[7m     Chcase (PF1 + "3")$[0m
$[7m
	Typing  GOLD  and  then  the  3  key  causes  all upper case
	characters to be changed to lower case characters  when  the
	'WORD  (1)'  or  'EOL (2)' keypad keys are typed. Only those
	characters skipped by the command  (EOL  or  WORD)  will  be
	affected.  CHCASE  mode can be turned off ONLY by typed GOLD
	and '3' again, thus CHCASE is toggled.
$[0m\
.ENDM 

.MACRO FOUR
$[1m$[7m\
     Bottom ("4")$[0m
$[7m\

          The '4' key causes a movement to the end of the file.

$[1m$[7m\
     Fill (PF1 + "4")
$[0m$[7m\

          Typing GOLD and then the 4 key will cause the text  on
          the current line to be expanded with spaces out to the
          current fill margin (see /FILL:N).   The  fill  margin
          defaults  to  72,  and can be changed by typing ^V and
          then, after the 'SET>' prompt, the string FILL:value ,
          where  'value'  is  the decimal value for the new fill
          margin. As an alternative  to using the  current  fill
	  factor, you can set a repeat count (using gold digits)
	  to define the fill size.
$[0m
.ENDM

.MACRO FIVE
$[1m$[7m     Top ("5")$[0m
$[7m
          The '5' key is top of file (line 1).


$[1m$[7m     Center (PF1 + "5")$[0m
$[7m
          The '5' key, when typed immediately after the PF1  key
          is  typed,  centers  the  current  line based upon the
          current fill (see GOLD M or Control  V).   The  center
          line should not contain embedded tabs.
          As an alternative  to using the  current  fill factor,
	  you can set  a repeat  count (using  gold  digits)  to 
	  define the fill size.
$[0m\
.ENDM

.MACRO SIX
$[1m$[7m     Paste ("6")$[0m
$[7m
          The '6' key inserts text saved by the 'cut (3)' key.


$[1m$[7m     Zapsel (PF1 + "6")$[0m
$[7m
          The '6' key, when typed immediately after the PF1  key
          is typed, erases the contents of the paste buffer.
$[0m\
.ENDM

.MACRO SEVEN
$[1m$[7m     Findlast ("7")$[0m
$[7m
          The '7' key is used to locate a text  pattern  in  the
          file and move backwards to that page if the pattern is
          found.  The search is from the  current  line  to  the
          first line of the file, a reverse search.  The  search
          uses the previous search pattern, if present.

$[1m$[7m     SearchB (PF1 + "7")$[0m
$[7m
          The '7' key, when typed immediately after the PF1  key
          is  typed,  does a search but from the current line to
          the begining of the file instead of to the end of  the
          file.  Entered as PF1 7 from the keypad.   The  search
          is always prompted for, typing a carriage return  will
          cause the previous pattern to be used.
$[0m\
.ENDM


.MACRO EIGHT
$[1m$[7m     SwapCHR ("8")$[0m
$[7m
          By typing the 8 key,  the  character  at  the  current
          cursor  position  will be swapped with the next one if
          neither of them are line terminators.


$[1m$[7m     SwapLIN (PF1 + "8")$[0m
$[7m
          By typing the PF1 key and then typing the "8" key, the
          current line will be swapped with the next line of the
          file.  It is an error if the current line is the  last
          line in the file.  Entered as GOLD 8.
$[0m\
.ENDM


.MACRO NINE
$[1m$[7mAppend ("9")$[0m
$[7m\
The  '9'  key  appends the current line to the paste buffer. This is the
only way to store lines that are not adjacent  into  the  paste  buffer.

$[1m$[7mSPCINS (PF1 + "9")$[0m
$[7m\
Inserts the ASCII character whose value is given in  the  previous  GOLD
digits command. Entered as GOLD digits GOLD 9, as follows:

All  keypad  commands (except beginline "0") can be repeated from one to
999 times by setting a repeat  count  with  the  command  sequence  GOLD
(which  is  PF1) followed by a string of 1 to 3 digits. The numbers will
be echoed on the last line of the display. The entering of  this  repeat
count  is stopped by typing anything other than a rubout or a digit. The
'repeat count' is one-shot,  it  is  ALWAYS  cleared  any  each  control
character  or  KEYPAD command. It is also cleared if anything other than
a command is typed after setting the repeat count.  This  is  also  used
for  SPSINS,  in  which  case  the  value  is  converted  to  the  ascii
representation and placed into the current line. A repeat count  of  '*'
(typed  GOLD  *) is an infinite count, except for DELLINE (PF4 or ^D) in
which case all lines to the end of the page are deleted. 
$[0m\
.ENDM


.MACRO PF1
$[7;1m\
GOLD$[0m\
      This is the key that shifts other keys to their gold functions
$[7m\
 GOLD A$[0m\
   Typing  PF1  followed by the letter  A  will move the  current
          left margin to the current position in the line.
$[7m\
 GOLD G$[0m\
   Typing  PF1 and then G will insert a file at the current line.
$[7m\
 GOLD L$[0m\
   Typing PF1 followed by L will toggle the macro 'learn' feature.
          If not  on, then all input following will be saved, otherwise
          'learn' will  be turned off. The saved text is executed by ^E.
$[7m\
 GOLD M$[0m\
   This  gets you into a menu where various parameter can be set.
$[7m\
 GOLD P$[0m\
   This will fill the current paragraph (from the current line to
          the next blank line) out to the current  right margin  (fill).
          See Gold M or control  V  for  setting the margin. Default 72.
	  A repeat  count will  always override the current fill factor.
	  If there is a left margin (GOLD A), all  text will be aligned.
$[7m\
 GOLD Q$[0m\
   QUEUE  the current  select range or page  to a  print  spooler
$[7m\
 GOLD S$[0m\
   This is the same as the SAVE command outside of the VT command
$[7m\
 GOLD T$[0m\
   This inserts the  current date and time  into the current line
$[7m\
 GOLD U$[0m\
   The same as ctrl U, it erases the current line. See also UNDEL
$[7m\
 GOLD W$[0m\
   This dumps the current 'select' range out  to  a  disk file.
          The range is defined as being  the lines  from the time  the
          select command was given up  to and including  current line.
$[7m\
 GOLD digits$[0m\
 This sets the command repeat count. See SPCINS (keypad '9').
.ENDM
.MACRO PF2
$[7m     PF2,control P, GOLD PF2
$[0m
          Next page, reprint  current  page  and  previous  page
          respectively.
.ENDM
.MACRO PF3
$[7;1m    FINDNEXT  (PF3)$[0m\
  does a search to the next occurance of a previous
    search string, moving the cursor to sit on the first character  of
    the  string  found (if found). The search is from the current line
    and cursor position to the end of the  file.  The  search  pattern
    can be loaded by using the 'FIND' command or by typing GOLD ENTER.

$[7;1m\
    FIND (GOLD PF3)$[0m is FINDNEXT with a prompt for the pattern string
$[0m	
Special Pattern Matching
$[7;1m	\
^X $[0m	$[7mmatches any character (also available as ^Ex)       $[0m
$[7;1m	\
^S $[0m	$[7mAccepts any non alpha-numeric                       $[0m
$[7;1m	\
^Ea$[0m	$[7maccepts any alphabetic (A-Z,a-z)                    $[0m
$[7;1m	\
^Ec$[0m	$[7maccepts A-Z,a-z,0-9,. and dollar symbol             $[0m
$[7;1m	\
^Ed$[0m	$[7maccepts any digit 0-9                               $[0m
$[7;1m	\
^Er$[0m	$[7maccepts any upper case letter or any digit 0-9      $[0m
$[7;1m	\
^Es$[0m	$[7maccepts any space or tab                            $[0m
$[7;1m	\
^Ev$[0m	$[7mmatches any lowercase letter                        $[0m
$[7;1m	\
^Ew$[0m	$[7mmatches any uppercase letter                        $[0m
$[7;1m	\
^E<nnn>$[0m	$[7maccept the character whose ASCII code (octal) is nnn$[0m
$[7;1m	\
^R $[0m	$[7muse the next character literally (for example, ^R^E)$[0m
.ENDM
.MACRO PF4
$[7m     DELLINE (PF4)
$[0m$[7m     UNDELLINE (GOLD PF4)
$[0m
          Deletes the current line or word.  DELLINE is the same
          as Control D Undeleteline (GOLD PF4) recovers the most
          recently deleted line.  Delline can be modifed in  two
          ways.   The first is to enter a repeat count to delete
          N lines (or a * to delete to end of page).  The  other
          option  is  to  start  a  select  range (by typing the
          keypad key 3) and then  moving  down  until  you  have
          moved  past  the  last line to be deleted.  Typing PF4
          will then delete the entire range of lines.
.ENDM
.MACRO DASH
$[7m     DELWORD ("-")
$[0m$[7m     UNDELWORD (PF1 + "-")
$[0m
          Delword deletes up to the  start  of  the  next  word.
          Undeleteword recovers the most recent delete.
.ENDM
.MACRO COMMA
$[7m     DELCHAR (",")
$[0m$[7m     UNDELCH (PF1 + ",")
$[0m
          Same as rubout, except that at EOL,  merges  with  the
          next line.  UNDELCH restores the most recently deleted
          character.  Entered as , or GOLD ,.
.ENDM
.MACRO ENTER
$[7m\
     Replace ("enter")
$[0m
          Same as control N (^N). Causes a search and replace for page

$[7m\
     SETPAT (gold enter)
$[0m
	  Sets the next pattern for FINDNEXT (PF3)

     Special pattern matching strings:

$[7;1m	^X $[0m	$[7mmatches any character  (also available as ^Ex)$[0m
$[7;1m	^S $[0m	$[7mAccepts any non alpha-numeric$[0m
$[7;1m	^Ea$[0m	$[7maccepts any alphabetic (A-Z,a-z)$[0m
$[7;1m	^Ec$[0m	$[7maccepts A-Z,a-z,0-9,. and dollar symbol$[0m
$[7;1m	^Ed$[0m	$[7maccepts any digit 0-9$[0m
$[7;1m	^Er$[0m	$[7maccepts any upper case letter or any digit 0-9$[0m
$[7;1m	^Es$[0m	$[7maccepts any space or tab$[0m
$[7;1m	^Ev$[0m	$[7mmatches any lowercase letter$[0m
$[7;1m	^Ew$[0m	$[7mmatches any uppercase letter$[0m
$[7;1m	^E<nnn>$[0m	$[7maccepts the character\
 whose ASCII code (octal) is nnn$[0m
$[7;1m	^R $[0m	$[7muse the next character literally (for example, ^R^E)
$[0m\
.ENDM

.MACRO PERIOD
$[7m\
     Gold + "."
$[0m
          Typing this will cause  all  following  characters  to
          replace characters rather than to be inserted into the
          current line.  This is automatically disabled  by  any
          keypad  command or by reaching eol.  This command acts
          like a toggle.  Entered as 'PF1 .' on the keypad.
.ENDM
.MACRO CTRLA
       Control A (^A)

          Control A causes the VTEDIT function to terminate  and
          returns the user to the normal command prompting mode.
          All changes are of course saved.
.ENDM
.MACRO CTRLB
       Control B (^B)

          Control B causes the displayed page  to  be  the  last
          page in the file (end of file).
.ENDM
.MACRO CTRLC
       Control C (^C)

          Control C works the same as ^A with the abort  message
          displayed.
.ENDM
.MACRO CTRLD
       Control D (^D)

          Control D deletes the current line.  'Current' is  the
          line that cursor is presently on.  All lines after the
          deleted line will be reprinted.  Multiple lines  (1-9)
          can  be  deleted at one time by preceding this command
          with an 'escape digit' sequence, saving much  time  in
          display reprinting.
.ENDM
.MACRO CTRLE
       Control E (^E)

          Control E will cause the  text  saved  by  either  the
          control  W  or  control X commands to be executed as a
          command stream.  At the end of  this  text,  input  is
          reset  back  to  the keyboard.  This provides a simple
          macro-command type facility  since  control  sequences
          can  be stored and executed.  Additionally, by preced-
          ing this command  with  the  'escape  digit'  you  can
          repeat the commands 1 to 999 times, as in GOLD 4 ^E.
.ENDM
.MACRO CTRLF
       Control F (^F)

          Control F will cause the cursor to move forward to the
          next  word in the current line, stopping at the end of
          the line.
.ENDM
.MACRO CTRLG
       Control G (^G)

          Control G is like control E, but only causes the saved
          text to be inserted into the current line.  It is thus
          much faster than using the control  E  command.   (see
          text  for  control X and control W).  This command can
          be modified by  preceding  it  with  the 'GOLD  digit'
          sequence  (digit  is  1-6) which causes the text to be
          retrieved from different save areas (there are  seven,
          the default and 1-6).
.ENDM
.MACRO CTRLH
       Control H

          Typing the backspace key moves the cursor to  the  end
          of  the  current line.  If the cursor is at the end of
          the line, the cursor will move back to begining of the
          line.
.ENDM
.MACRO CTRLK
       Control K

          Typing the control K combination will  cause  all  the
          characters  from  the  current  cursor position to the
          next 'word' (see PF1) to to be deleted.  This will  be
          much faster than holding down the rubout key.
.ENDM
.MACRO CTRLN
       Control N

          Control N is a find  and  replace  command.   It  will
          replace  all occurances of the text with new text from
          the current line down to the end of the page.
.ENDM
.MACRO CTRLP
       Control P

          Control P reprints the VT100 top header line and screen.
.ENDM
.MACRO CTRLR
       Control R

          Control R is the opposite of control  F  in  that  the
          cursor will move backwards to the previous word in the
          line, stopping at the left margin.
.ENDM
.MACRO CTRLT
       Control T

          Control T causes the page to move to the  top  of  the
          file at line one.
.ENDM
.MACRO CTRLU
       Control U

          Control U erases (but does  not  delete) from the current
	  positoin to the start of the line.  See help for PF1  for
	  information on GOLD U, which erases the current line.
.ENDM
.MACRO CTRLV
       Control V

          Control V allows you to change the  parameters  passed
          as  command switches, or simply to set values, such as
          turning line numbering off (/NOLINE) or  moving  to  a
          given line number (/PAG:300).

          Control V parameters:

          /NOL   'nolinenumbers' Do not print line numbers out
          /LIN   'linenumbers'   Print line numbers (default)
          /VT52  say our terminal is a DEC VT52 (or Heath H19)
          /VT100 say our terminal is a DEC VT100 (the default)
          /PAG:n Start initial page at line 'n', not at line 1
          /PDEL  enable normal rubout key movement
          /FIL:n set fill line length to value in 'n'
          /WRAP  enable auto line wraparound for kb input
          /LMA:n set left margin
.ENDM
.MACRO CTRLW
       Control W

          Control W saves all the text in the current line  into
          the   text   save  area.   Line  terminators  are  not
          included.  Multiple save areas  can  be  specified  by
          using  the 'escape digit' sequence prior to this.  See
          the above text for control G.
.ENDM
.MACRO CTRLX
       Control X

          Control X loads the text save area from the  keyboard.
          See help for control E and control G.
.ENDM
.MACRO CTRLY
       Control Y

          Control Y can be used to fake a  carriage  return  for
          storing  commands with the control X command.  This is
          useful if a command sequence for say, text replacement
          (^N)  is  to  be  stored  and  later executed with the
          control E command.  If typed any other time,  it  will
          simply reprint the current line.
.ENDM
.MACRO CTRLZ
The use of control Z
$[7m
Line  insert  mode is entered automatically by typing a carriage return,
line feed or form feed (^L). The screen will be blanked  from  the  line
to  be  inserted  down to the end of the page. Insert mode is terminated
by typing a control Z (^Z) instead of a  <cr>  to  finish  off  a  line.
This is also stopped by most of the keypad commands.

The  left  arrow, right arrow and rubout keys will continue to operate
normally in this mode. The other defined control characters  (E,  F,  G,
H,  P, R, U, W, X, and backspace) will operate normally. In general, any
command that would cause the current line to change will reset this.

The  control  V  set commands 'WRAP', 'NOWRAP' and 'FILL:decvalue' alter
the way insertion mode works for text entry. If 'WRAP'  is  set  a  line
break  is  done  automatically  when  the fill margin is reached, which
defaults to 72. NOWRAP will disable this feature and is the default. 

An  alternative  to  the blanking of the screen and sticking in 'insert'
mode is the parameter 'PRINT' , set by either using ^V or GOLD M.  This,
when set, will cause a cr/lf simply to start a new line VTEDIT style. 
$[0m$[0m\
.ENDM
