User Tools

Site Tools


tutorials:edit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tutorials:edit [2014/01/28 16:28]
papa created
tutorials:edit [2016/10/20 03:44] (current)
papa [More Commands]
Line 1: Line 1:
 **EDIT** is a line-oriented text editor for TOPS-20 on TWENEX.ORG. **EDIT** is a line-oriented text editor for TOPS-20 on TWENEX.ORG.
  
-Since EDIT's executable file name is the same as the EXEC command for invoking the default editor, you must use the following command to start EDIT unless you have set it as your default editor.+===== Invocation =====
  
-<code+EDIT is usually started with the ''EDIT'' command. However, if you have [[tutorials:editor|customized your default editor]], the ''EDIT'' command may invoke a different editor. To run EDIT without disturbing your default editor setting, use the command ''SYS:EDIT'' or ''R EDIT''.  
-@R EDIT + 
-</code>+===== Command Line Editing ===== 
 + 
 +As a line-oriented editor, all editing tasks are accomplished in EDIT by entering commands at the EDIT command prompt (''*''). If you wish to make changes to the current command line before submitting it (by pressing ''Enter''), you may use the following keys: 
 +  * ''Delete'' (usually mapped to the ''Back Space'' key) -- Delete one character to the left of the cursor. 
 +  * ''Ctrl-U'' -- Delete the entire command line without submitting it. 
 + 
 +===== Basic Commands ===== 
 + 
 +  * ''D''//a//['':''//b//] -- Delete line //a// (through line //b//). 
 +  * ''E'' -- Save file and return to EXEC. 
 +  * ''EQ'' -- Discard unsaved changes and return to EXEC. 
 +  * ''I''//a// -- Insert mode after line //a//. End with ''Esc'' key. 
 +  * ''P''//a//['':''//b//] -- Print line //a// (through line //b//) on terminal. 
 +  * ''R''//a//  -- Replace line //a// 
 +  * ''S''//t//''Esc''//u//''Esc''//a// -- Substitute text //u// for text //t// on line //a//. 
 + 
 +===== More Commands ===== 
 + 
 +TWENEX's on-line help file for EDIT is reproduced below. 
 + 
 +  Summary of EDIT commands        10-Feb-76 
 +   
 +  I    Insert              [<position>,<increment>] 
 +     Print               [<range>][,N] 
 +  .    Move pointer        [<position>
 +  D    Delete              [<range>
 +  K    Kill page mark      [/<page number>
 +  R    Replace             [<range>,<increment>
 +  E    End (Exit to command level) 
 +   EN  Suppress ".Qxx/.Zxx" file creation 
 +   EI  Insert identifying line before ending 
 +   EJ  Delete first line of file and do an EI command 
 +   EQ  Quit (while you're ahead) 
 +   EU  Unsequence output file 
 +  G    Go (Exit and do last LOAD-class command) 
 +   GI  Do an EI command, and then go 
 +   GJ  Do an EJ command, and then go 
 +   GN  Do an EN command, and then go 
 +   GU  Do an EU command, and then go 
 +  B    Backup - (same as E but leaves you at EDIT command level) 
 +   BI  Do an EI command, without ending 
 +   BJ  Do an EJ command, without ending 
 +   BN  Do an EN command, without ending 
 +   BU  Do an EU command, without ending 
 +  M    Mark                [<position>
 +  N    Number              [<increment>,<range>,<start>
 +   NA  Add <increment> to <range> 
 +   NP  Preserve line numbers over page marks 
 +  L    List (on LPT)       [<range>
 +  J    Join                [<position>
 +  F    Find                [<string>$<range>,<foptions>
 +  S    Substitute          [<old string>$<new string>$<range>,<soptions>
 +  C    Copy                [<dest-position>,<range>
 +          or               [<dest-position>=<filespec>,<range>
 +          or               [<dest-position>=<filespec>/S] 
 +  T    Transfer            [<dest-position>,<range>
 +  X    eXtend              [<range>,L] (,L suppresses typeout) 
 +  H    Help (types this text) 
 +  ?    Types list of available commands 
 +  <LF> Same as P.+1 
 +  $    Same as P.-1 
 +  @<filespec>      Indirect command file 
 +   
 +  A    Alter               [<range>
 +   
 +      ?          Print list of alter commands 
 +     nC<ch>      Change n characters 
 +    -nD          Delete next/last characters 
 +      E          Finish with no printing 
 +    -nF<ch>      Find the nth next/previous occurrence of <ch> 
 +     nI<text>  Insert with temp increment n 
 +      J          Break line and stick rest at front of next 
 +    -nK<ch>      Delete to n occurrences of <ch> 
 +      L          Print line and recycle 
 +      P          Print line and recycle to current position 
 +      Q          Quit ALTER (restore original line) 
 +    -nR<text>  nD then 0I 
 +     nW          Skip forward n words 
 +      X<text>  Delete word then 0I 
 +    -n<SP>       Space forward/backward n characters 
 +      <CR>       Finish and print rest of line 
 +     n<RUB>      Backspace n characters 
 +     n<BS>       Backspace n characters 
 +     -<HT>       Skip to end/start of line 
 +      ^U         Quit and restart ALTER 
 +   
 +  EDIT parameters:
 +   
 +  name         set  print  default value          what 
 +   
 +    .                     ---            current <position> 
 +    ?                     ---            /? list settable switches 
 +                                             =? list printable switches 
 +  BAK                     on             create backup file <.Qxx> 
 +  BIG                     ---            largest page # 
 +  C64               CASE    on             64 character set 
 +  C128          y     CASE    off            128 character set 
 +  CASE          n     CASE    C64 M33 UPPER  give case information 
 +  DECIDE        y           off            auto ",D" for "S" command 
 +  DPY                     off            special  display mode 
 +  ERROR                   ---            print last error message 
 +  EXPERT        y           off            Q.E.D 
 +  INCREMENT               100            default line increment 
 +  INSERT        y           ---            location of next I<CR> 
 +  ISAVE                                controls auto-W on inserts 
 +  LOCATION      n           ---            first line in edit buffer 
 +  LOWER             CASE    off            default lower case 
 +  M33               CASE    on             terminal characteristics 
 +  M37               CASE    off            terminal characteristics 
 +  NAME          y           ---            output file spec 
 +  NOBAK                   off            no backup file 
 +  NODECIDE      y           on             no auto ",D" 
 +  NONSEPARATORS y     CASE    on             %,$,. are not alphanumerics 
 +  NONUMBER      y           off            don't print line numbers 
 +  NOVICE        y           on             normal mode 
 +  NUMBER        y           on             print line numbers on 
 +                                             terminal 
 +  OLD                     off            creat backup file (.Zxx) 
 +  OPTION        y           ---            read "SWITCH.INI" file 
 +  PLINES        y           16             used by "P<CR> 
 +              Same as RONLY 
 +  RONLY                   off            read-only file 
 +  READONLY      Same as RONLY 
 +  RUN                     LOAD-class     set run spec 
 +  SAVE          y                        controls auto-W on commands 
 +  SEPARATORS    y           off            treat %,$,. as alphanumeric 
 +  START                   100            starting sequence # 
 +  STEP          y           100            default line increment 
 +  STRING        n           ---            current F & S strings 
 +  UNSEQUENCE    y           off            unsequence output file 
 +  UPPER             CASE    on             default upper case 
 +  WINDOW        y                        size of edit file window 
 +   
 +     * All settable parameters may be specified as switches in the 
 +  initial command string. 
 +   
 +  EDIT special characters: 
 +   
 +  Replacement:   ^B  '"    next match string 
 +                 ^O  '   '*<number>'* is nth match string 
 +                 ^^  '   quote next character 
 +   
 +  Match:         ^E  '   not 
 +                 ^N  '   arbitrary number of 
 +                 ^T  '   any character 
 +                 ^^  '   quote next character 
 +                  ^  ':    separator 
 +   
 +  Positions:        present line or page 
 +                    first line or page 
 +                    last line or page 
 +   
 +  EDIT definitions and meanings: 
 +   
 +  <range   ::= <pos>[!<number> or 
 +                       :<pos>
 +   
 +  <pos>      ::= [<line>][/<page>
 +   
 +  <line>     ::= [<number> or 
 +                  <content> or 
 +                  . or * or ^][(+-)<number>
 +   
 +  <page>     ::= [<number> or 
 +                  . or * or ^][(+-)<number>
 +   
 +  <content>  ::= $<string>$<range>,<foptions> 
 +   
 +  <number>   ::= any positive integer .LE. 2^35-1 
 +   
 +  Options: 
 +   
 +       ,  Decide on each substitution (S command) 
 +       ,  Match upper/lower case characters Exactly (F and S commands) 
 +       ,  Do not print contents of line (F, S, and X commands) 
 +       ,  Enter ALTER mode (F and S commands) 
 +       ,  Do not print line number (P command) 
 +   
 +  Special functions of the "I" command: 
 +   
 +  I<CR>       default is set to end of last: 
 +                 Replace, except at end of page 
 +                 Insert, except wrap around or out of space 
 +   
 +  I/<page>    does insert page mark at end of <page> followed by Istart, 
 +              where start is the value of the START switch (Originally, 
 +              the START switch is set at 100). 
 +   
 +  I<pos>!n    allows insertion of n lines; calculates increment from 
 +              table of aesthetic values. 
 +   
 +  I^          inserts a line at the top of the page, halfway between line 
 +              0 and the first line. 
 +   
 +  EDIT  Command Format: 
 +   
 +  @CREATE (FILE) /switches input.typ.gen 
 +  or, 
 +  @EDIT (FILE) /switches input.typ.gen (OUTPUT AS) output.typ.gen 
 +   
 +  CREATE requires that input.typ.gen is a new file; EDIT 
 +  works regardless of whether the file exists or not. 
 +   
 +  /switches  is a list of settable switches which may 
 +  be recognized.  If an illegal switch is encountered, 
 +  the entire command is ignored. 
 +   
 +  input.typ.gen, and output.typ.gen are TOPS-20 file 
 +  specifications; recognition is available.  Output.typ.gen 
 +  defaults to input.typ.-1 if it is not explicitly typed. 
 +   
 + 
 +===== References ===== 
 + 
 +  * [[http://tilt.twenex.org/|TOPS-20 User's Guide]] 
 +  * //(__EDIT User's Guide__ and __EDIT Reference Manual__ were published by DEC as part of the TOPS-20 Software Notebook series, but the author has been unable to locate any printed or electronic copies of either manual.)//
  
tutorials/edit.1390926480.txt.gz · Last modified: 2014/01/28 16:28 by papa