home *** CD-ROM | disk | FTP | other *** search
/ ftp.update.uu.se / ftp.update.uu.se.2014.03.zip / ftp.update.uu.se / pub / rainbow / msdos / misc / sedtfile.lzh / SEDTADV.EDT < prev    next >
Text File  |  1986-01-04  |  47KB  |  1,057 lines

  1.  
  2.     SEDT advanced guide, Version 2.1
  3.     Introduction
  4.     
  5.                   Introduction
  6.  
  7.                 This  document is a sequel to "An introductory  guide  to 
  8.     the  SEDT  text  editor,"  which  should  be studied first.    It 
  9.     completes  the  description  of  SEDT's  built-in  functions  and 
  10.     explains how to  customize the editor by changing the definitions 
  11.     of the keys.   This guide has been written for Digital keyboards.  
  12.     If you have an IBM  PC or IBM AT keyboard refer to appendix A for 
  13.     a translation from Digital to IBM keys.
  14.  
  15.  
  16.  
  17.  
  18.     SEDT advanced guide, Version 2.1
  19.     Command-line arguments
  20.     
  21.                              Command-line arguments
  22.  
  23.                 When you activated SEDT, you can give  it  certain  extra 
  24.         instructions  by adding to the command line.   If  you  supply  a 
  25.         second file specification, thus:
  26.  
  27.                         SEDT B:FROGS.TXT B:NEWFROGS.TXT
  28.  
  29.                 SEDT  loads  up  the  editing buffer from the first-named 
  30.         file,  but  makes  the second-named file the default output file.  
  31.         There are also  some  hyphen-plus-single-letter  switches, any or 
  32.         all of which can  be appended at the end of the SEDT command:  -J 
  33.         disables  the generation of a  journal  file  (thus  making  SEDT 
  34.         faster but less reliable);  -E causes a control-Z character to be 
  35.         appended to a file when it is written out to a disk;  -B disables 
  36.         the generation of a .BAK file when an edited file is  written out 
  37.         with the same name as an existing file (beware -- if you  disable 
  38.         backup  and  you  don't  have  enough  disk space to hold the new 
  39.         version, you  wind up with no version).  -R ensures that the last 
  40.         line of any  file  saved from SEDT is terminated with a <RETURN>.  
  41.         -D informs SEDT that  it  is being run on an IBM PC or compatible 
  42.         using a Digital keyboard.
  43.  
  44.                 It is also possible to  invoke SEDT with no arguments, in 
  45.         which case you will have to  select  an  output file once you get 
  46.         into the program, using the <GOLD> <S> command.
  47.  
  48.  
  49.  
  50.     SEDT advanced guide, Version 2.1
  51.     Initialization files and journal files
  52.     
  53.                      Initialization files and journal files
  54.  
  55.                 When SEDT is activated,  it looks for a file SEDTCOM.TXT, 
  56.         first in SEDT's master directory, or SEDT$COMMANDS under VAX/VMS, 
  57.         containing a script of  SEDT  command  sequences.  If the file is 
  58.         found,  the basic commands are  executed  during  initialization.  
  59.         (See below for an explanation of SEDT's basic commands.)
  60.  
  61.                 SEDT also looks for a file with the same  filename proper 
  62.         as the one being edited, but the filetype .JOU.   If this file is 
  63.         found, SEDT will submit the keystrokes it records as if they came 
  64.         from the keyboard,  thus  reconstructing the editing session that 
  65.         was interrupted.  (One  important  limitation:   Journal files do 
  66.         not  record  movements  of  data  from  one  window  to  another;  
  67.         windowing operations are ignored during recovery.)
  68.  
  69.                 The  entire  sequence of initialization  operations  that 
  70.         SEDT goes through can be summarized as follows:
  71.  
  72.               1.  Load the input file  into  buffer  0;  if the specified 
  73.                 input file is not found in the current directory, display 
  74.                 a warning message and start with buffer 0 empty.
  75.  
  76.               2.    Recover  the   key  definitions  from  MS/DOS,  CP/M:  
  77.                 SEDTKEYS.TXT  in  SEDT's  master    directory;       VMS:  
  78.         SEDT$KEYS;  abort if this file is not found.
  79.  
  80.               3.  Recover the ruler from  MS/DOS,  CP/M:    RULER0.TXT in 
  81.                 SEDT's master  directory;  VMS:  SEDT$LIBRARY:RULER0.TXT;  
  82.                 if this file  is not found, display a warning message and 
  83.                 set up a default ruler.
  84.  
  85.               4.   If the user has supplied a line number in  the  MS-DOS 
  86.                 command that activates  SEDT,  move  the  cursor  to that 
  87.                 line.
  88.  
  89.               5.  Look for a script  in  CP/M,    MS/DOS:  SEDTCOM.TXT in 
  90.                 SEDT's master directory;  VMS:  SEDT$COMMANDS and execute 
  91.                 the instructions in it if it is found.
  92.  
  93.               6.  Look for a  .JOU  file  with  the  same filename as the 
  94.                 input  file  and reproduce the effect of  the  keystrokes 
  95.         recorded in it if it is found.
  96.  
  97.  
  98.  
  99.     SEDT advanced guide, Version 2.1
  100.     Command structure
  101.     
  102.                                 Command structure
  103.  
  104.                 As noted in the introductory document,  a  command can be 
  105.     preceded by a repetition factor, indicating how  many times it is 
  106.     to be done.  In addition, with any  direction-dependent  command, 
  107.     it  is  possible to override the default direction of  motion  by 
  108.     typing  <GOLD> <+> or <GOLD> <>> (for forward motion), or  <GOLD> 
  109.     <->  or  <GOLD>  <<>  (for  backward motion), before the command.  
  110.     Such a prefix should precede the repetition-factor prefix if both 
  111.     are  used,  and    replaces    the    initial    <GOLD>   of  the 
  112.     repetition-factor prefix.
  113.  
  114.                 When you are responding  to  a  prompt from SEDT, you can 
  115.     edit your response by pressing  the  boxed  X  key  to delete the 
  116.     previous character, the left and right  arrow  keys  to  move the 
  117.     cursor  back  and  forth  so  that additional characters  can  be 
  118.     inserted, and <CTRL/U> to discard the entire response.
  119.  
  120.  
  121.  
  122.     SEDT advanced guide, Version 2.1
  123.     Additional cursor movement commands
  124.     
  125.                        Additional cursor movement commands
  126.  
  127.                 On the 23'd display  line, at the start, SEDT indicates a 
  128.         direction  of cursor movement (either  "Forward"  or  "Reverse").  
  129.         This directional indication applies to a group of cursor movement 
  130.         commands that were not mentioned in the introductory guide:
  131.  
  132.     Move one character.  
  133.     
  134.             Keypad key <3> shifts the cursor one character in 
  135.         the  current  direction  of  cursor  movement.    (It  is 
  136.         therefore equivalent to the  right  arrow  if the current 
  137.         direction  is  "Forward," to the  left  arrow  if  it  is 
  138.         "Reverse.")
  139.  
  140.     Move to next beginning of word.  
  141.     
  142.             Keypad  key  <1> shifts the cursor  to  the  next 
  143.         point  in  the  current direction of cursor  movement  at 
  144.         which a word begins.
  145.  
  146.     Move to next beginning of line.  
  147.     
  148.             Keypad  key  <0>  shifts  the cursor to the  next 
  149.         point  in  the  current  direction  of cursor movement at 
  150.         which a line begins.
  151.  
  152.     Move to next end of line.  
  153.     
  154.             Keypad  key  <2>  shifts  the  cursor to the next 
  155.         point in  the  current  direction  of  cursor movement at 
  156.         which a line ends.
  157.  
  158.     Move to next beginning of paragraph.  
  159.     
  160.             Keypad key <8>  shifts  the  cursor  to  the next 
  161.         point in the current  direction  of  cursor  movement  at 
  162.         which a paragraph begins.
  163.  
  164.     Move to next page break.  
  165.     
  166.             Keypad key <7> shifts the cursor to the next page 
  167.         break in the current direction of cursor  movement, or to 
  168.         the  beginning  or  end  of  the file if  no  page  break 
  169.         isencountered.   (The way to insert a page break  into  a 
  170.         text you are editing is to press <GOLD> <P>.)
  171.  
  172.  
  173.     SEDT advanced guide, Version 2.1
  174.     Additional cursor movement commands
  175.     
  176.                 The direction of motion also affects the behavior of  the 
  177.     "Search  for    specific   string"  operation  described  in  the 
  178.     introductory guide.   If  the  current  direction is Forward, the 
  179.     "Search for specific string"  operation searches from the current 
  180.     cursor position towards the end of the buffer;  if it is Reverse, 
  181.     however,  the search proceeds from the  current  cursor  position 
  182.     backwards towards the beginning of the file.
  183.  
  184.                 When SEDT is initially entered, the  default direction of 
  185.     motion  is  Forward.   The "Back up"  command  (keypad  key  <5>) 
  186.     switches it to Reverse;  the "Advance" command  (keypad  key <4>) 
  187.     restores the Forward direction of motion.  Many experienced users 
  188.     always preserve  the  Forward  direction,  moving  backwards when 
  189.     necessary by pressing  <5>,  giving the necessary cursor-movement 
  190.     commands, and then pressing <4>.
  191.  
  192.                 Two other cursor-movement operations  are  independent of 
  193.     the direction of motion:
  194.  
  195.     Move to previous beginning of line.  
  196.     
  197.             The <BS> key,  also marked <F12>, the second from 
  198.         the left in the  third  group of gray keys across the top 
  199.         of the keyboard, moves the cursor to the beginning of the 
  200.         line on which it is placed,  or,  if it is already at the 
  201.         beginning  of a line, to the beginning  of  the  previous 
  202.         line.   (Thus it works like the Reverse  version  of  the 
  203.         "Move  to  next beginning of line" command, but does  not 
  204.         presuppose the Reverse direction of motion.)
  205.  
  206.     Mark position.  
  207.     
  208.             <GOLD> <M> ("Mark")  causes  SEDT to remember the 
  209.         position in the text  that  is  occupied by the cursor at 
  210.         the time the command is  entered.    Subsequently one can 
  211.         return to that position by pressing  <GOLD>,  followed by 
  212.         the  <.> key on the ordinary typewriter  keyboard  (NOTE:  
  213.         NOT THE NUMERIC KEYPAD).  Actually up to ten positions in 
  214.         the  text  can  be marked independently;    the  sequence 
  215.         <GOLD>,  number,  <GOLD>,  <M>,  where  "number"  is  any 
  216.         decimal number from 1 to 10, will set  a  mark,  and  the 
  217.         sequence  <GOLD>,  number,  <GOLD>,  <.>  will go to that 
  218.         mark.    The  mark that is used by default in  the  plain 
  219.         vanilla <GOLD> <M> is mark #1.
  220.  
  221.                 Finally, SEDT recognizes certain  synonyms  for  familiar 
  222.     commands.  <GOLD> <B> and  <GOLD>  <down  arrow> are synonyms for 
  223.     <GOLD> <4>;  either of them  moves  the  cursor to the end of the 
  224.     buffer.  Similarly, <GOLD> <T> and <GOLD> <up arrow> are synonyms 
  225.     for <GOLD> <5>.
  226.  
  227.  
  228.  
  229.     SEDT advanced guide, Version 2.1
  230.     File-management and buffer-management commands
  231.     
  232.                  File-management and buffer-management commands
  233.  
  234.                 SEDT permits the user to manipulate several files of text 
  235.     simultaneously  and  to  switch from one file to another  without 
  236.     exiting from  the  program.    Specifically,  SEDT maintains four 
  237.     independent "main" text  buffers, numbered from 0 to 3.  When the 
  238.     program is initially activated,  the  user is placed in buffer 0;  
  239.     however, one can move into  any  of  the four buffers by pressing 
  240.     the correct function key in the  rightmost  group of gray keys at 
  241.     the top of the keyboard:
  242.  
  243.                                 <F17> -- buffer 0
  244.                                 <F18> -- buffer 1
  245.                                 <F19> -- buffer 2
  246.                                 <F20> -- buffer 3
  247.  
  248.         When any of these keys is pressed,  the  screen  splits  into two 
  249.     parts, the lower part displaying the buffer that  was  previously 
  250.     being edited, the upper part displaying the contents of the newly 
  251.     selected  buffer.  (It is possible to select the buffer  you  are 
  252.     already editing as the new buffer;  in this case you wind up with 
  253.     two windows into the same file.)
  254.  
  255.                 SEDT supplies the following  commands for managing files, 
  256.     buffers, and windows:
  257.  
  258.         Load current file into buffer.  
  259.     
  260.             If you have just entered  a  new,  empty  buffer, 
  261.         <GOLD> <F> allows you to load  a  file into it or to name 
  262.         the file that you want to create  from it.  (SEDT prompts 
  263.         you at the bottom of the screen to  enter the name of the 
  264.         file.) If you issue this command when the current  buffer 
  265.         contains text that has not yet been saved in a  file, you 
  266.         will receive the message
  267.  
  268.                       Save changes to current file? (Y/N):
  269.  
  270.                 If you respond affirmatively,  a  save  operation 
  271.         will  be  performed;   otherwise,  the  contents  of  the 
  272.         current buffer will be discarded.   In  either  case, the 
  273.         subsequent effect is like entering SEDT on the file whose 
  274.         name you provide.
  275.  
  276.  
  277.     SEDT advanced guide, Version 2.1
  278.     File-management and buffer-management commands
  279.     
  280.     Zap buffer.  
  281.     
  282.             <GOLD> <Z> causes SEDT to discard the contents of 
  283.         the current buffer and to forget the file  name  formerly 
  284.         associated with it, giving you a clean slate to  work on.  
  285.         If  the  current  buffer  contains text that has not been 
  286.         saved  at the time you enter this command, SEDT gives you 
  287.         one last chance:
  288.  
  289.         Unsaved changes to this buffer.  Are you sure? <Y/N>:
  290.  
  291.                 A negative response cancels the ZAP operation.
  292.  
  293.     Include file into buffer.  
  294.     
  295.             <GOLD> <G> causes  SEDT to copy the contents of a 
  296.         file that you specify  (in  response to a further prompt) 
  297.         into the current buffer immediately  before  the  current 
  298.         cursor position.
  299.  
  300.     Print current buffer.  
  301.     
  302.             <CTRL/P>  transmits  the contents of the  current 
  303.         buffer  to the LST:  device.   A  prompt  allows  you  to 
  304.         specify a file name, if that is appropriate.
  305.  
  306.     Load file into paste buffer.  
  307.     
  308.             <GOLD>  <F4> prompts you for the name of  a  file 
  309.         and copies that  file  into the (invisible) paste buffer, 
  310.         from which it can  be inserted into the text with <INSERT 
  311.         HERE>.
  312.  
  313.     Toggle number of windows displayed.  
  314.     
  315.             If the current display  consists  of two windows, 
  316.         <GOLD> <D> eliminates the lower one and extends the upper 
  317.         one so that more of the  file  being  edited can be seen.  
  318.         If the current display consists of one window, <GOLD> <D> 
  319.         divides the screen, shrinking the current buffer into the 
  320.         upper  window  and  displaying  the  most recently edited 
  321.         alternative buffer in  the  lower  window.   (If no other 
  322.         buffer has been edited, the lower window is empty.)
  323.  
  324.     Toggle screen width.  
  325.     
  326.             <GOLD> <W> changes the display from 80 columns to 
  327.         132 columns or from 132 columns to 80 columns.
  328.  
  329.  
  330.     SEDT advanced guide, Version 2.1
  331.     File-management and buffer-management commands
  332.     
  333.     Refresh screen.  
  334.     
  335.             <CTRL/W>  blanks the entire  screen  momentarily.  
  336.         This command is used when  you  have two windows into the 
  337.         same buffer.  Normally, any editing changes that are made 
  338.         in the upper window are not reflected  in  the lower one;  
  339.         <CTRL/W> updates both windows so that their contents  are 
  340.         consistent.
  341.  
  342.                 The <EXIT>  key  is  a  synonym  for  <GOLD>  <E>;    the 
  343.     <INTERRUPT> key is  a  synonym  for <GOLD> <S>;  and the <CANCEL> 
  344.     key is a synonym for <GOLD> <Q>.
  345.  
  346.                 <GOLD>  <H>  activates  the  help  facility,  so it is  a 
  347.     synonym for <HELP> and <PF2>.  Inside the help facility,  you can 
  348.     press  either  <NEXT  SCREEN>  or <RETURN> to advance to the next 
  349.     screen,  either  <PREV  SCREEN>  or <BS> to go back a screen, and 
  350.     either  <EXIT> or the space bar to return to the editing session.  
  351.     The contents of the help facility are drawn from the SEDTHELP.TXT 
  352.     file;  if  this  file  is  not  in  the  default  directory, SEDT 
  353.     displays an error message.
  354.  
  355.                 Finally, three notes concerning the screen display:
  356.  
  357.                 A star (*) is placed to the left of the file name on line 
  358.     1 of the display whenever  an  editing operation that changes the 
  359.     contents of the buffer has taken  place  since  the file was last 
  360.     saved.
  361.  
  362.                 The notation Ln after the direction indicator  in  line 1 
  363.     means that SEDT is recording a sequence of  keystrokes  for later 
  364.     execution, rather than executing them interpretively.
  365.  
  366.                 If  a  line  displayed  on the screen extends beyond  the 
  367.     physical  screen  margin,  a reverse-video > appears at the right 
  368.     edge.
  369.  
  370.  
  371.  
  372.     SEDT advanced guide, Version 2.1
  373.     Miscellaneous editing commands
  374.     
  375.                          Miscellaneous editing commands
  376.  
  377.     Change case.  
  378.     
  379.             Pressing  <GOLD>,  then keypad key  <1>,  usually 
  380.         causes the character on which the  cursor  is positioned, 
  381.         if it is a letter, to change  from  lower  case  to upper 
  382.         case or vice versa.  The cursor then advances to the next 
  383.         character.  It is possible to reverse the case  of  a lot 
  384.         of letters at once by using <SELECT> to delimit the chunk 
  385.         within which the reversal is to take place, then pressing 
  386.         <GOLD> <1>,  just as in EDT.  If no <SELECT> operation is 
  387.         active, SEDT will check whether the most recent operation 
  388.         was a search command,  in  which case it will reverse the 
  389.         case of the string that  matched  the search string.  The 
  390.         one-character "Change case" operation is the  default  if 
  391.         neither of these prior conditions holds.
  392.  
  393.     Transpose characters.  
  394.     
  395.             <GOLD>  <ENTER> swaps the character on which  the 
  396.         cursor is positioned with  the  one immediately following 
  397.         it.
  398.  
  399.     Insert control character.  
  400.     
  401.             To  insert  an  ASCII  control  character  or  an 
  402.         extended  ASCII    character  that  the  keyboard  cannot 
  403.         normally generate, press  <GOLD>, type the ASCII code for 
  404.         the character as a  decimal  integer,  press  <GOLD>, and 
  405.         finally press keypad key <3>.  (In one particular case -- 
  406.         the escape character, ASCII 27 -- there is a shorter way;  
  407.         just press the <ESC> key twice.)
  408.  
  409.     Search and substitute.  
  410.     
  411.             Pressing  <GOLD>  and then keypad key <9>  causes 
  412.         SEDT  to request two strings, the first a  string  to  be 
  413.         sought, the second a string that is to replace  the first 
  414.         if  it  is  found.    SEDT  starts at the current  cursor 
  415.         position and searches in the current direction of motion;  
  416.         when it finds  the  string it is looking for, it replaces 
  417.         it with the new  string  and positions the cursor on that 
  418.         new  string.    Subsequently,  pressing  keypad  key  <9> 
  419.         (without  <GOLD>)  repeats  the operation with  the  same 
  420.         strings.    <GOLD>  <U>, if entered immediately  after  a 
  421.         substitution, reverses its effect.
  422.  
  423.  
  424.     SEDT advanced guide, Version 2.1
  425.     Miscellaneous editing commands
  426.     
  427.     Append to paste buffer.  
  428.     
  429.             You  can cut out an arbitrary chunk of  text  and 
  430.         have it appended to the  previous  contents  of the paste 
  431.         buffer (instead of displacing them) by using <SELECT> and 
  432.         cursor movement to define the chunk, then  pressing  <F4> 
  433.         rather than <REMOVE>.
  434.  
  435.  
  436.  
  437.     SEDT advanced guide, Version 2.1
  438.     Additional formatting commands
  439.     
  440.                          Additional formatting commands
  441.  
  442.     Hyphenate and reformat.  
  443.     
  444.         <GOLD> <_> places  a  hyphen  and  a space at the current 
  445.         cursor position, presumably the  end  of a line, and then 
  446.         backs  up  a  couple  of   lines  and  performs  a  "Fill 
  447.         paragraph" operation, assuming that the hyphenation  will 
  448.         improve the appearance of the paragraph.
  449.  
  450.     Indenting or extruding a text segment.  
  451.     
  452.             A  segment  of text that has been  isolated  with 
  453.         SELECT (and appears in reverse video in the  window)  can 
  454.         be  shifted rightwards or leftwards on the screen to  any 
  455.         desired tab stop.  Press <GOLD> <+> <CTRL/T> to shift the 
  456.         selected passage rightwards, <GOLD> <-> <CTRL/T> to shift 
  457.         it leftwards.  (The  reference  is  to the <-> key on the 
  458.         regular typewriter keyboard, not the  one  on the numeric 
  459.         keypad.)  To  shift more than one  tab  stops,  type  the 
  460.         appropriate    decimal  numeral  immediately  before  the 
  461.         <CTRL/T>.
  462.  
  463.                 The following  three  commands  can be used to change the 
  464.     level of indentation  (the  I  mark  on  the  ruler) at any time, 
  465.     without entering the ruler-editing context):
  466.  
  467.     Reset indentation.  
  468.     
  469.             <CTRL/A>  resets  the  indentation level  to  the 
  470.         current cursor position.
  471.  
  472.     Decrease indentation.  
  473.     
  474.             <CTRL/D>  decreases the indentation level by  one 
  475.         column.
  476.  
  477.     Increase indentation.  
  478.     
  479.             <CTRL/E>  increases  the indentation level by one 
  480.         column.
  481.  
  482.                 The  following  ruler-editing commands, which can be used 
  483.     after  <GOLD>  <R>  has activated ruler-definition mode, were not 
  484.     covered in the introductory document:
  485.  
  486.  
  487.     SEDT advanced guide, Version 2.1
  488.     Additional formatting commands
  489.     
  490.     Move the cursor along the ruler.  
  491.     
  492.             <TAB> advances  the  cursor to the next tab stop;  
  493.         <BS> returns it to column 1.
  494.  
  495.     Save a ruler in a file.  
  496.     
  497.             It is possible  to  save as many as ten different 
  498.         rulers in files in  the  directory  from  which  SEDT  is 
  499.         invoked.  To save the  current  ruler  in  a  file, press 
  500.         <GOLD>  and  (on  the ordinary typewriter  keyboard)  any 
  501.         digit between 0 and 9.  The  ruler  will  be saved in the 
  502.         file RULERx.TXT, where x is replaced by the digit typed.
  503.  
  504.     Recover a saved ruler.  
  505.     
  506.             To load a ruler that exists in such a file, press 
  507.         the   key  for  the  digit  that  designates  the  ruler.  
  508.         RULER0.TXT has a special status;  if SEDT is started from 
  509.         a directory that  has  a  file  with that name, the ruler 
  510.         contained in that file is loaded during initialization.
  511.  
  512.     Set automatic margin adjustment.  
  513.     
  514.             Pressing    <A>    activates  automatic    margin 
  515.         adjustment, with the effect that when the <RETURN> key is 
  516.         pressed   during  editing,  the  cursor  is    positioned 
  517.         immediately below the leftmost nonblank character on  the 
  518.         line just completed.  This is used for  editing  computer 
  519.         programs.
  520.  
  521.         Remove all formatting controls.  
  522.     
  523.             Pressing the space bar deactivates any formatting 
  524.         specification at the cursor position.
  525.  
  526.                 The complete set of margination rules is as follows:
  527.  
  528.                 If L, W, R,  and  I  are  all  in  column 1 (which is the 
  529.     default if no RULER0.TXT file  is  found when SEDT is activated), 
  530.     the user must press <RETURN> at  the  end  of  each line, and the 
  531.     cursor always returns to column 1.
  532.  
  533.                 If L appears in a column other  than 1, pressing <RETURN> 
  534.     causes the cursor to return to that column.
  535.  
  536.                 If I appears in a column other than  1  and the cursor is 
  537.     positioned to the left of that column, pressing <TAB>  causes the 
  538.     cursor to move to that column.
  539.  
  540.  
  541.     SEDT advanced guide, Version 2.1
  542.     Additional formatting commands
  543.     
  544.                 If  A appears in any column, pressing <RETURN> causes the 
  545.     cursor  to  return to the position immediately below the leftmost 
  546.     nonblank character on the line just completed.
  547.  
  548.                 If R  appears in any column other than 1 and W appears in 
  549.     any column, typing  anything  in  a  column to the right of the R 
  550.     will cause a word wrap to occur.  This has two effects:  The word 
  551.     that extends past the R  will  be  shifted to the following line, 
  552.     starting at the column in which  W appears;  and in the old line, 
  553.     the spacing will be adjusted so that  there  are two blanks after 
  554.     each  word  that ends with a period, question  mark,  exclamation 
  555.     point, colon, or semicolon, and one blank after any other word.
  556.  
  557.                 Similarly, if R appears in any column other than  1 and A 
  558.     appears in any column, typing anything in a column to  the  right 
  559.     of the R causes a word wrap, with the shifted word  being  placed 
  560.     beneath the leftmost nonblank character in the line from which it 
  561.     was taken.
  562.  
  563.                 The rules for a J that appears in any column other than 1 
  564.     are the same as those for R, except that once the shifted word is 
  565.     removed to the next  line, additional spaces may be inserted into 
  566.     the remainder in order to bring the right end of the line all the 
  567.     way out to the column marked with a J.
  568.  
  569.  
  570.  
  571.     SEDT advanced guide, Version 2.1
  572.     SEDT basic commands
  573.     
  574.                                SEDT basic commands
  575.  
  576.                 All  of  the  operations  that    SEDT  can  perform  are 
  577.     combinations of certain basic commands;   SEDT  works essentially 
  578.     as a command interpreter, converting keystrokes into sequences of 
  579.     basic commands before passing them into the heart  of the program 
  580.     to be carried out.  In other words, the basic commands serve as a 
  581.     sort of intermediate language for editing, much less userfriendly 
  582.     but considerably closer to the editor's operational level.
  583.  
  584.                 Basic commands can be used in  four ways in SEDT.  In the 
  585.     first place, if you can formulate a  basic  command or a sequence 
  586.     of them, you can issue it at any  time  during  an editing job by 
  587.     pressing  <GOLD>, followed by the keypad key <7>, and  responding 
  588.     to  the  'Command:' prompt with the appropriate character string.  
  589.     Second, you can create a file containing any SEDT "script" -- any 
  590.     sequence of SEDT  operations  --  and  have it executed during an 
  591.     SEDT session by pressing  <GOLD> <X> and supplying the file name.  
  592.     Third, you can redefine a  key  at  any  time  during  an editing 
  593.     session so as to make it  equivalent  to  any  sequence  of basic 
  594.     commands;  this is discussed in the  following  section.  Fourth, 
  595.     you  can  rewrite the file containing the key  definitions,  thus 
  596.     modifying the command interpreter  to  bring  it  closer  to your 
  597.     vision of the perfect text editor.
  598.  
  599.                 SEDT's  basic  commands  are  of  two  types:    movement 
  600.     commands and others.    Both  kinds can be written either with or 
  601.     without a period at  the end;  if a period is present, it signals 
  602.     EDT that the action described can be taken immediately, whereas a 
  603.     command without a period is held  up pending a further command or 
  604.     command sequence.  Movement commands have the structure
  605.  
  606.                               [sign] [count] entity
  607.  
  608.         The  sign  field  is either + (indicating  forward  movement),  - 
  609.     (indicating  backward  movement)  or  omitted (in which case  the 
  610.     movement is in the current default direction of movement).    The 
  611.     count field indicates how many times the component movement is to 
  612.     be  repeated,  and may be omitted if the movement is only  to  be 
  613.     performed once.    The permissible values of the entity field are 
  614.     as described in the table below.
  615.  
  616.  
  617.     SEDT advanced guide, Version 2.1
  618.     SEDT basic commands
  619.     
  620.     Some SEDT commands require  a  string argument which is delimited 
  621.     at both ends by a character that is not part of the string.
  622.  
  623.              @BB             Start of buffer
  624.              @C              Single character
  625.              @EB             End of buffer
  626.              @EL             End of line
  627.              @F<delimiter>string<delimiter>      
  628.                       Beginning of next occurrence of a string
  629.              @L              Beginning of line
  630.              [count]@M       Marked point numbered [count]; default is
  631.                                      point 1
  632.              @N              Start of occurrence of current search string
  633.              @PAG            Start of page
  634.              @PAR            Start of paragraph
  635.              @SR             Point marked by <SELECT>
  636.              @V              Same position in adjacent line
  637.              @W              Start of word
  638.  
  639.         The delimiter that  figures  in  the definition of the @F entity, 
  640.     here  shown  as  a  dollar  sign,  may  be  any  visible  graphic 
  641.     character,  presumably  one that does not  occur  in  the  string 
  642.     sought.  The same delimiter must be  used  at  each  end  of  the 
  643.     string.
  644.  
  645.                 Inside a non-movement command, a mention  of  an "entity" 
  646.     usually refers to the swatch of text  between  the current cursor 
  647.     position and the position with which the entity is equated in the 
  648.     preceding  table.    Instead of moving the cursor to  that  other 
  649.     point, SEDT performs some transformation on the intervening text.
  650.  
  651.  
  652.     SEDT advanced guide, Version 2.1
  653.     SEDT basic commands
  654.     
  655.         Non-movement commands have the structure
  656.  
  657.                              [sign] [count] command
  658.  
  659.         Here the sign field, as above, indicates the direction of  motion 
  660.     or  of entity-definition for the command.  Except as indicated in 
  661.     the list, the count field again gives a repetition factor and may 
  662.     be omitted if  the  command  is  to  be  done  only once.  (Note, 
  663.     however, that the :CH,  :M, and :WI commands, like the @M entity, 
  664.     pre-empt the count field for their own use.)
  665.  
  666.              :A              Set default direction of motion to Forward
  667.              :B              Set default direction of motion to Reverse
  668.              :CCentity       Change case within entity
  669.              :CDentity       Lower-case all letters within entity
  670.              :CE             Change case in EDT style: throughout <SELECT>
  671.                                      entity if there is one, else throughout
  672.                                      current search string if there is one,
  673.                                      else on current character
  674.              count:CH        Insert character with specified ASCII value
  675.              :CL             Center text of current line
  676.              :CUentity       Upper-case all letters within entity
  677.              :Dentity        Delete entity
  678.              :EAPentity      Delete entity and append to deletion buffer
  679.              :FE<delimiter>filename<delimiter>   
  680.                       Load the specified file (if it exists) and
  681.                                      begin editing it
  682.              :FG<delimiter>filename<delimiter>   
  683.                       Insert the specified file at the current
  684.                                      cursor position
  685.              :FS<delimiter>filename<delimiter>   
  686.                       Save current buffer into specified file
  687.              :FX<delimiter>filename<delimiter>   
  688.                       Execute SEDT script in specified file
  689.              :GAPentity      Append entity to deletion buffer without
  690.                                      deleting it
  691.              :GEentity       Copy entity into deletion buffer without
  692.                                      deleting it
  693.          count:GR         Load ruler number count
  694.              :H              Display help message
  695.              :I<delimiter>string<delimiter>      
  696.                       Insert string at current cursor position
  697.              :Kkey<delimiter>string<delimiter>   
  698.                       Define key as string
  699.              :LD             Decrease indentation by 1
  700.              :LI             Increase indentation by 1
  701.              :LKkey          Load key definition from current buffer
  702.              :LNEkey         Execute keystrokes saved in key
  703.              :LNLkey         Save keystrokes into key until key is
  704.                                      retyped
  705.  
  706.     SEDT advanced guide, Version 2.1
  707.     SEDT basic commands
  708.     
  709.              :LS             Set indentation level to current column
  710.              :M              Mark current cursor position as point 1
  711.              count:M         Mark current cursor position as point count
  712.              :NL             Insert newline character
  713.              :NS             Repeat substitution with previously defined
  714.                                      substituend
  715.          :OE<delimiter>message<delimiter>
  716.                       Display  message  and  take  normal    error 
  717.                                action
  718.          :OM<delimiter>message<delimiter>
  719.                       Display message
  720.              :OL             Open line at present cursor position
  721.          :OS         Toggle between overstrike and replace mode
  722.          :PD          Insert current date in format DD-MMM-YYYY
  723.              :PL<delimiter>filename<delimiter>   
  724.                       Load specified file into paste buffer
  725.              :PR<delimiter>filename<delimiter>   
  726.                       Print current buffer on LST: device
  727.              :PS<delimiter>filename<delimiter>   
  728.                       Save paste buffer to specified file
  729.              :Q              Abort without saving file
  730.              :REP            Substitute contents of paste buffer for
  731.                                      search string
  732.              :RF             Re-draw the screen
  733.              :RL             Switch to ruler-definition mode
  734.              :RS             Cancel select point
  735.          :SC         Display column position of cursor
  736.              :SEL            Save current cursor position as select point
  737.              :SKkey          Save key definition in current buffer
  738.          :SLentity         Load contents of entity into search string
  739.              :SUB<delimiter>object<delimiter>target<delimiter>
  740.                              Substitute target string for next occurrence
  741.                                      of object string
  742.              :SYS<delimiter>string<delimiter>    
  743.                       Spawns string as a command to the MS-DOS
  744.                                      operating system
  745.              :TAB            Insert enough tab and space characters to
  746.                                      advance to next tab stop
  747.              :TADentity      Realign left margin within entity by one
  748.                                      tab stop in the default direction
  749.              :TFentity       Fill within entity
  750.              :TI             Stop repeating current command sequence when
  751.                                      any key is pressed
  752.          :TT          Toggle between insertion  and  expansion  of 
  753.                      tab characters
  754.              :UC             Undelete last-deleted character
  755.              :UL             Undelete last-deleted line
  756.              :UM             Undo last movement or substitution command
  757.              :UPAG           Undelete last-deleted page
  758.              :UPAR           Undelete last-deleted paragraph
  759.  
  760.     SEDT advanced guide, Version 2.1
  761.     SEDT basic commands
  762.     
  763.              :UPD            Update screen, including header
  764.              :USEN           Undelete last-deleted sentence
  765.              :USR            Insert contents of paste buffer at current
  766.                                      cursor position
  767.              :UU             Undelete last unknown entity
  768.              :UW             Undelete last-deleted word
  769.              :WC             Toggle between one- and two-window display
  770.              :WD             Toggle between 80- and 132-column display
  771.              count:WI        Switch to buffer number count (0, 1, 2, or 3)
  772.              :X              Exit and save file after creating backup
  773.              :Z              Erase current buffer
  774.  
  775.  
  776.     SEDT advanced guide, Version 2.1
  777.     SEDT basic commands
  778.     
  779.         The arguments for certain of  the  commands need to be explained.  
  780.     An entity can be any of  the  strings  defined in the first table 
  781.     above.  A key is a string of one of the following forms:
  782.  
  783.                                       Annn 
  784.                                       Fnnn 
  785.                                       GAnnn
  786.                                       GFnnn
  787.  
  788.         where 'nnn' is to be replaced by three decimal digits.   The form 
  789.     'Annn' designates  the  key  that  generates  the ASCII character 
  790.     whose code is nnn.  'Fnnn' designates function key number nnn, as 
  791.     follows:
  792.  
  793.                            F000 -- <COMPOSE CHARACTER>
  794.                            F001 -- <HOLD SCREEN>
  795.                            F002 -- <PRINT SCREEN>
  796.                            F003 -- <SET-UP>
  797.                            F004 -- <F4>
  798.                            F005 -- <BREAK>
  799.                            F006 -- <INTERRUPT>
  800.                            F007 -- <RESUME>
  801.                            F008 -- <CANCEL>
  802.                            F009 -- <MAIN SCREEN>
  803.                            F010 -- <EXIT>
  804.                            F011 -- <ESC>
  805.                            F012 -- <BS>
  806.                            F013 -- <LF>
  807.                            F014 -- <ADDTNL OPTIONS>
  808.                            F015 -- <HELP>
  809.                            F016 -- <DO>
  810.                            F017 -- <F17>
  811.                            F018 -- <F18>
  812.                            F019 -- <F19>
  813.                            F020 -- <F20>
  814.                            F021 -- <FIND>
  815.                            F022 -- <INSERT HERE>
  816.                            F023 -- <REMOVE>
  817.                            F024 -- <SELECT>
  818.                            F025 -- <PREV SCREEN>
  819.                            F026 -- <NEXT SCREEN>
  820.                            F027 -- <up arrow>
  821.                            F028 -- <left arrow>
  822.                            F029 -- <down arrow>
  823.                            F030 -- <right arrow>
  824.                            F031 -- keypad <0>
  825.                            F032 -- keypad <1>
  826.                            F033 -- keypad <2>
  827.                            F034 -- keypad <3>
  828.                            F035 -- keypad <4>
  829.  
  830.     SEDT advanced guide, Version 2.1
  831.     SEDT basic commands
  832.     
  833.                            F036 -- keypad <5>
  834.                            F037 -- keypad <6>
  835.                            F038 -- keypad <7>
  836.                            F039 -- keypad <8>
  837.                            F040 -- keypad <9>
  838.                            F041 -- keypad <,>
  839.                            F042 -- keypad <->
  840.                            F043 -- keypad <.>
  841.                            F044 -- <PF1>
  842.                            F045 -- <PF2>
  843.                            F046 -- <PF3>
  844.                            F047 -- <PF4>
  845.                            F048 -- <ENTER>
  846.  
  847.         The  prefix 'G' differentiates  the  cases  in  which  <GOLD>  is 
  848.     pressed before the indicated typewriter or function key.
  849.  
  850.                 To indicate that a sequence of commands is to be repeated 
  851.     as a unit, one can enclose the entire sequence in parentheses and 
  852.     prefix a count (a decimal integer) to  it  to indicate the number 
  853.     of repetitions.  A count of 0, in  this  context,  indicates that 
  854.     the  sequence  is  to  be  repeated indefinitely, until an  error 
  855.     occurs  or  until the :TI operation detects that a key  has  been 
  856.     pressed.   (For  instance,  the  definition  of  the <GOLD> <left 
  857.     arrow> operation is
  858.  
  859.                                    0(-@L:TI).
  860.  
  861.         -- that is,  "move  in  reverse to successive beginnings of lines 
  862.     until an error occurs or a key is pressed."
  863.  
  864.                 A sequence of commands can be execute only if the current 
  865.         buffer has been  modified by enclosing the enclosing the commands 
  866.         with ^C( and ).    This  contruct is useful for saving a modified 
  867.         file before spawning to a  postprocessor.    A  variation of this 
  868.         contruct is to have two sequences  of  commands  separated  by  | 
  869.         within  the  parentheses which causes the first  sequence  to  be 
  870.         executed  if  the  buffer  is  modified  and the  second  if  not 
  871.         modified.
  872.         
  873.  
  874.     SEDT advanced guide, Version 2.1
  875.     SEDT basic commands
  876.     
  877.                 It is also possible to program error handling into  a key 
  878.         definition with the construct:
  879.         
  880.                 ^E(command1)(command2)
  881.         
  882.                 The  string  of commands in command1 is executed.  If  an 
  883.         error  occurs  anywhere  in these the rest of command1 is skipped 
  884.         and  the  sequence command2 will be executed.  If no error occurs 
  885.         command2 will be skipped. A slightly more complex variant is:
  886.         
  887.                 ^E(command1)(command2|command3)
  888.         
  889.                 Command1 is  executed and if any error occurs the rest of 
  890.         command1 will be  skipped and the sequence command2 executed.  If 
  891.         no error occurs command3  will  be  executed  after completion of 
  892.         command1.  You can force  SEDT  to  ignore errors in a command by 
  893.         enclosing it in the following construct:
  894.         
  895.                 ^E(command)()
  896.  
  897.                 The key-definition file is  SEDTKEYS.TXT;   SEDT consults 
  898.     this  file  during initialization every  time  it  is  activated.  
  899.     Therefore, all you need to do  in  order  to customize SEDT is to 
  900.     modify this file, which is a text  (non-binary)  file  containing 
  901.     lines of the form
  902.  
  903.                              <key><command sequence>
  904.  
  905.         Substitute the commands you prefer, or add new key definitions at 
  906.     the end of the file.
  907.  
  908.                 In the key-definition file it is possible to specify that 
  909.     a particular command should display a prompt and wait for  input, 
  910.     which  it  then  incorporates  into  the basic command.    A  key 
  911.     definition    containing  an  exclamation  point  followed  by  a 
  912.     delimited  string  (any  visible  character  may  be  used  as  a 
  913.     delimiter), when executed,  prints  out the specified string as a 
  914.     prompt and waits for  a keystroke, optionally preceded by <GOLD>.  
  915.     The name of the key thus detected is edited into the command.
  916.  
  917.                 Similarly,  a  key definition containing a question  mark 
  918.     followed by a delimited string prints out the specified string as 
  919.     a  prompt and waits for a string input, terminated  by  <RETURN>, 
  920.     <DO>, or <ENTER>.  The input string is then incorporated into the 
  921.     instruction.
  922.  
  923.  
  924.     SEDT advanced guide, Version 2.1
  925.     SEDT basic commands
  926.     
  927.                 The  construction  %F  is a key definition is replaced by 
  928.     the name  of  the  current  default  output  file,  including the 
  929.     filetype;  %N  is  replaced by the filename proper of the current 
  930.     default output file (excluding the filetype).
  931.  
  932.                 Question marks, exclamation points,  or  percentage signs 
  933.     that appear in key definitions  for  any  other  purpose  must be 
  934.     doubled.
  935.  
  936.  
  937.  
  938.     SEDT advanced guide, Version 2.1
  939.     Defining and redefining keys
  940.     
  941.                           Defining and redefining keys
  942.  
  943.                 If you have some sequence of  commands  that  needs to be 
  944.     repeated many times during an editing session,  you  can define a 
  945.     key to designate the entire sequence:
  946.  
  947.     Define (or redefine) any key.  
  948.     
  949.             Causes  SEDT  to  issue two prompts.  The  first, 
  950.         'Key:', asks the user to press the key or  combination of 
  951.         keys to be defined;  the second, 'As:', asks the  user to 
  952.         press  the  sequence  of  keys that the defined key is to 
  953.         abbreviate.  As  the keys are pressed, the basic commands 
  954.         that they stand for  appear  at the bottom of the screen.  
  955.         (It is also possible to  reply  to  the  'As:'  prompt by 
  956.         typing in the sequence of basic  commands to be executed, 
  957.         in the format described in the previous  section.    This 
  958.         will  be  necessary  if  the  command  to be  abbreviated 
  959.         includes  any  key  that is used for editing the  command 
  960.         line itself, such as the left arrow or the boxed X.)
  961.  
  962.         Saving keystrokes for later execution.  
  963.     
  964.             After <GOLD> <F17>,  any  sequence  of keystrokes 
  965.         that you supply is  stored  in  memory  instead  of being 
  966.         executed immediately.  The sequence  is  to be terminated 
  967.         by <CTRL/Z>.  It may not include <GOLD> <F18>, since this 
  968.         would lead to an infinite loop on execution (see the next 
  969.         command).
  970.  
  971.         Executing stored keystrokes.  
  972.     
  973.             A sequence  of  keystrokes  that  has been stored 
  974.         with the preceding  command  can be activated by pressing 
  975.         <GOLD> <F18>.
  976.  
  977.         Display a default key definition.  
  978.     
  979.             You  can  examine the  SEDTKEYS.TXT  file,  which 
  980.         contains  the  default key definitions,  without  leaving 
  981.         SEDT, as follows:  Press <GOLD>  <CTRL/I>,  and  reply to 
  982.         the prompt "Key:" by pressing the key  that  you  wish to 
  983.         redefine;   the current definition, spelled out in  terms 
  984.         of  SEDT's  basic commands, will appear in the buffer  at 
  985.         the current cursor position.
  986.  
  987.  
  988.     SEDT advanced guide, Version 2.1
  989.     Defining and redefining keys
  990.     
  991.     Edit a default key definition.  
  992.     
  993.             You can  also  edit the SEDTKEYS.TXT file without 
  994.         leaving SEDT:  Prepare the line containing the definition 
  995.         in the buffer,  then  press  <GOLD> <CTRL/L> and reply to 
  996.         the prompt "Key:" by  pressing  the  key to be redefined.  
  997.         The SEDTKEYS.TXT file will be modified accordingly.
  998.  
  999.  
  1000.     SEDT advanced guide, Version 2.1
  1001.     Appendix A
  1002.     
  1003.                                    Appendix A
  1004.         
  1005.                        IBM to Digital keyboard translation
  1006.         
  1007.                 Digital key             PC key
  1008.         
  1009.                 F1                      ALT 1
  1010.                 F2                      ALT 2
  1011.                 F3,Setup                ALT 3
  1012.                 F4                ALT 4
  1013.                 F5,Break        ALT 5
  1014.                 F6,Interrupt        ALT 6
  1015.                 F7,Resume               ALT 7
  1016.                 F8,Cancel        ALT 7
  1017.                 F9,Main Screen        ALT 8
  1018.                 F10,Exit        ALT 9
  1019.                 F11,ESC                 ALT Q
  1020.                 F12,BS                ALT W
  1021.                 F13,LF                ALT E
  1022.                 F14,Additional Options  ALT R
  1023.                 F15,Help        ALT T, Shift keypad 5
  1024.                 F16,Do                    ALT Y, Shift keypad +
  1025.                 F17                ALT U
  1026.                 F18                ALT I
  1027.                 F19                ALT O
  1028.                 F20                ALT P
  1029.                 Find                F1, Shift keypad 7
  1030.                 Insert Here        F3, Shift keypad 0
  1031.                 Remove                F4, Shift keypad .
  1032.                 Select                F2, Shift keypad 1
  1033.                 Prev Screen        F5, Shift keypad 9
  1034.                 Next Screen        F6, Shift keypad 3
  1035.                 Up Arrow        F7, Shift keypad 8
  1036.                 Left Arrow        F9, Shift keypad 4
  1037.                 Down Arrow        F8, Shift keypad 2
  1038.                 Right Arrow        F10, Shift keypad 6
  1039.                 Keypad 0        Keypad 0
  1040.                 Keypad 1        Keypad 1
  1041.                 Keypad 2        Keypad 2
  1042.                 Keypad 3        Keypad 3
  1043.                 Keypad 4        Keypad 4
  1044.                 Keypad 5        Keypad 5
  1045.                 Keypad 6        Keypad 6
  1046.                 Keypad 7        Keypad 7
  1047.                 Keypad 8        Keypad 8
  1048.                 Keypad 9        Keypad 9
  1049.                 Keypad ,        PC: Shift keypad -; AT: Keypad -
  1050.                 Keypad -        PC: Keypad -; AT: Prt Sc
  1051.                 Keypad .        Keypad .
  1052.                 Keypad PF1        PC: Num Lock; AT: Esc
  1053.                 Keypad PF2              PC: Shift Num Lock; AT: Num Lock
  1054.                 Keypad PF3        Scroll Lock
  1055.                 Keypad PF4        PC: Shift Scroll Lock; AT: Sys
  1056.                 Keypad Enter            Keypad +
  1057.