-
Notifications
You must be signed in to change notification settings - Fork 0
Text editors
Many activities in ITS involve editing text files. Traditionally, the primary editor was TECO. TECO added more and more features during the mid-1970s. Eventually it was powerful enough to build EMACS on top, and that quickly became most people's favorite editor. If you already know GNU Emacs or one of its clones, you're in luck: the ITS version is quite close. If not, you have a choice between learning EMACS or go the traditional route with TECO. There are also a few less popular editors not covered here; in partular Rmode was popular in the Dynamic Modeling group and brought along to Infocom!
The easiest way to make a new text file, is to use the DDT :CREATE command with a file name on the command line. You can then enter text verbatim, ending the file with a ^C.
TECO is based on a page-at-a-time model. This stems from its early days as a paper tape editor: the user would load ("yank") one page of text from the paper tape reader, make necessary edits, and write the finished page on the paper tape punch. True to its roots, there is no way to back up a page. For the same reason, TECO has a separate idea about where the input is from, and where the output is going; the user has to explicitly specify both.
TECO commands are entered into a separate buffer and are only executed when double altmode is typed. Accomplished users can build up a long string of commands to be executed together.
A typical session will look like this:
- Start TECO: TECO^K or :TECO
- Specify input and output.
- ERfile$ opens file for input.
-
EW prepares for writing output to a temporary file called
_TECO_ OUTPUT
.
- Load the first page with Y or the entire file with @Y.
- Edit the page, and advance to the next page with P.
- Go back to step 4 as long as more pages need editing.
- Close the output file with EEfile$ and exit TECO.
Basic editing commands:
Command | Function |
---|---|
n R | Move cursor left. |
nC | Move cursor right. |
0L | Beginning of line. |
:L | End of line. |
nL | Beginning of nth line from the current position. |
Itext$ | Insert text. |
n D | Delete n characters to the right. |
-n D | Delete n characters to the left. |
K | Delete to end of line. |
Stext$ | Search for text. |
If you type ^R to TECO, you enter the real-time editing mode. This is an in-between traditional TECO and EMACS. Normal characters will be inserted and displayed immediately. The cursor movements are the same as in EMACS: ^F, ^B, ^N, and ^P move forward, back, previous, and next; ^A and ^E goes to the start and end of line. And deleting with ^D, Delete, and ^K do familiar things. You need to exit ^R Mode with Altmode to do things other than plain editing.
Command | Function |
---|---|
^X^F file CR | Load file |
^X^S file CR | Save file |
^X^C | Exit (but don't kill emacs) |
^F | Move cursor right (forward) |
^B | Move cursor left (backward) |
^A | Beginning of line |
^E | End of line |
^N | Go to next line |
^P | Go to previous line |
^D | Delete character to the right |
DEL | Delete character to the left |
^K | Delete to end of line |
IMEDIT is an editor using the Imlac computers. It loads the text file, one page at a time, into the Imlac memory for editing there. See IMEDIT basics.