User Tools

Site Tools


tutorials:edit

This is an old revision of the document!


EDIT is a line-oriented text editor for TOPS-20 on TWENEX.ORG.

Invocation

EDIT is usually started with the EDIT command. However, if you have 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.

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

  • Da[:b] – Delete line a (through line b).
  • E – Save file and return to EXEC.
  • EQ – Discard unsaved changes and return to EXEC.
  • Ia – Insert mode after line a. End with Esc key.
  • Pa[:b] – Print line a (through line b) on terminal.
  • Ra – Replace line a
  • StEscuEsca – Substitute text u for text t on line a.

More Commands

TWENEX's on-line help file for EDIT is reproduced below. Trying 192.94.73.36… Connected to twenex.org. Escape character is 'off'.

TWENEX.ORG, PANDA TOPS-20 Monitor 7.1(21733)-4

If new, type 'new new' ..

@papa Job 17 on TTY64 19-Oct-2016 7:56PM Previous LOGIN: 19-Oct-2016 4:08PM

Thursday, October 20, 2016 11:56:01 UTC+9 FM+0d.17h.3m.49s.

The plural of spouse is spice.

TWENEX.ORG QUESTS

* MAGIC.TXT * Clean-up MAIL.TXT * Web site index * Backup/mirror synch procedure * Fix VTTREK * Install DECWAR * DECWAR tournament * Macro A-B-Cs * Blink(?)-to-HTML generator * Quest manager * Install BASIC collection * BASIC programming tutorial * Port web/gopher client * Port gopher server * Multi-column file lister * Review NEW-USER.HLP * Is MOON off? Wed, 19 Oct 2016 16:34:51 -0800 (PDT) David Meyer PAPA@TWENEX.ORG TWENEX COMPRESS/UNCOMPRESS (569 chars; more?) y Fighting to get my TWENEX files under quota, I noticed two undocumented executables, COMPRESS and UNCOMPRESS.

COMPRESS <file> produces binary file <file>-Z that is smaller than the <file>. UNCOMPRESS <file>-Z prompts if it's OK to overwrite <file>, and if I say 'yes' produces a new version number of <file>. However, the contents of new <file> are not the original contents but some binary mish-mash.

Anyone remember how to use these two programs, or another way to compress TWENEX files and then uncompress them back into their original state?


@help edit Summary of EDIT commands 10-Feb-76

I Insert [<position>,<increment>] P 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) ^O…ypes list of available commands cMore? n @type login.cmd TERMINAL VT100 TERMINAL LENGTH 40 TERMINAL WIDTH 80 TERMINAL PAGE ; ^S output at each page TERMINAL RECEIVE LINKS ; allow for phone/send/talk TERMINAL NO RAISE ;DEFINE EDITOR: SYS:EDIT.EXE ;DEFINE EDITOR: SYS:EMACS.EXE DEFINE BAS: PS:<PAPA.BASIC> DEFINE HTML: PS:<PAPA.HTML> DEFINE HOME: PS:<PAPA> DEFINE LISP [MACLISP] DEFINE LPT: PS:<PAPA>DUMMY.FILE DEFINE TWOG: PS:<PAPA.HTML.TWOG> SET HISTORY 100 SET COMMAND-EDITOR EDIT EMACS SET COMMAND-EDITOR ENTER CONTROL “P” SET PROMPTS “@” “@@” “!” “!!” echo zotime moon today echo cookie echo type html:quests.txt bboard echo TAKE @terminal length 21 @help edit Summary of EDIT commands 10-Feb-76

I Insert [<position>,<increment>] P 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)


Trying 192.94.73.36… Connected to twenex.org. Escape character is 'off'.

TWENEX.ORG, PANDA TOPS-20 Monitor 7.1(21733)-4

If new, type 'new new' ..

@papa Job 17 on TTY64 19-Oct-2016 7:56PM Previous LOGIN: 19-Oct-2016 4:08PM

Thursday, October 20, 2016 11:56:01 UTC+9 FM+0d.17h.3m.49s.

The plural of spouse is spice.

TWENEX.ORG QUESTS

* MAGIC.TXT * Clean-up MAIL.TXT * Web site index * Backup/mirror synch procedure * Fix VTTREK * Install DECWAR * DECWAR tournament * Macro A-B-Cs * Blink(?)-to-HTML generator * Quest manager * Install BASIC collection * BASIC programming tutorial * Port web/gopher client * Port gopher server * Multi-column file lister * Review NEW-USER.HLP * Is MOON off? Wed, 19 Oct 2016 16:34:51 -0800 (PDT) David Meyer PAPA@TWENEX.ORG TWENEX COMPRESS/UNCOMPRESS (569 chars; more?) y Fighting to get my TWENEX files under quota, I noticed two undocumented executables, COMPRESS and UNCOMPRESS.

COMPRESS <file> produces binary file <file>-Z that is smaller than the <file>. UNCOMPRESS <file>-Z prompts if it's OK to overwrite <file>, and if I say 'yes' produces a new version number of <file>. However, the contents of new <file> are not the original contents but some binary mish-mash.

Anyone remember how to use these two programs, or another way to compress TWENEX files and then uncompress them back into their original state?


@help edit Summary of EDIT commands 10-Feb-76

I Insert [<position>,<increment>] P 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) ^O…ypes list of available commands cMore? n @type login.cmd TERMINAL VT100 TERMINAL LENGTH 40 TERMINAL WIDTH 80 TERMINAL PAGE ; ^S output at each page TERMINAL RECEIVE LINKS ; allow for phone/send/talk TERMINAL NO RAISE ;DEFINE EDITOR: SYS:EDIT.EXE ;DEFINE EDITOR: SYS:EMACS.EXE DEFINE BAS: PS:<PAPA.BASIC> DEFINE HTML: PS:<PAPA.HTML> DEFINE HOME: PS:<PAPA> DEFINE LISP [MACLISP] DEFINE LPT: PS:<PAPA>DUMMY.FILE DEFINE TWOG: PS:<PAPA.HTML.TWOG> SET HISTORY 100 SET COMMAND-EDITOR EDIT EMACS SET COMMAND-EDITOR ENTER CONTROL “P” SET PROMPTS “@” “@@” “!” “!!” echo zotime moon today echo cookie echo type html:quests.txt bboard echo TAKE @terminal length 21 @help edit Summary of EDIT commands 10-Feb-76

I Insert [<position>,<increment>] P 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

More? y EDIT parameters:*

name set print default value what

.           n     y       ---            current <position>
?           n     y       ---            /? list settable switches
                                         =? list printable switches

BAK y y on create backup file <.Qxx> BIG n y — largest page # C64 y CASE on 64 character set C128 y CASE off 128 character set CASE n CASE C64 M33 UPPER give case information DECIDE y y off auto “,D” for “S” command DPY y n off special display mode ERROR n y — print last error message EXPERT y n off Q.E.D INCREMENT y y 100 default line increment INSERT y n — location of next I<CR> ISAVE y y 0 controls auto-W on inserts LOCATION n y — first line in edit buffer LOWER y CASE off default lower case M33 y CASE on terminal characteristics M37 y CASE off terminal characteristics NAME y y — output file spec NOBAK y n off no backup file NODECIDE y n on no auto “,D” NONSEPARATORS y CASE on %,$,. are not alphanumerics NONUMBER y n off don't print line numbers NOVICE y n on normal mode NUMBER y n on print line numbers on

                                         terminal

OLD y n off creat backup file (.Zxx) OPTION y n — read “SWITCH.INI” file PLINES y y 16 used by “P<CR> R Same as RONLY RONLY y n off read-only file READONLY Same as RONLY RUN y y LOAD-class set run spec SAVE y y 0 controls auto-W on commands SEPARATORS y n off treat %,$,. as alphanumeric START y y 100 starting sequence # STEP y y 100 default line increment STRING n y — current F & S strings UNSEQUENCE y n off unsequence output file UPPER y CASE on default upper case WINDOW y y 8 size of edit file window

  • All settable parameters may be specified as switches in the

initial command string. More? y EDIT special characters:

Replacement: ^B '” next match string

             ^O  '*    '*<number>'* is nth match string
             ^^  '7    quote next character

Match: ^E '% not

             ^N  ')    arbitrary number of
             ^T  '/    any character
             ^^  '7    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:

   ,D   Decide on each substitution (S command)
   ,E   Match upper/lower case characters Exactly (F and S commands)
   ,L   Do not print contents of line (F, S, and X commands)
   ,A   Enter ALTER mode (F and S commands)
   ,N   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.

More? y 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.

[End of EDIT.HLP] @


References

  • (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.1476934334.txt.gz · Last modified: 2016/10/20 03:32 by papa