[ SDF Public Access UNIX System .. Est. 1987 ]

join welcome faq status members projects store tour gopher abuse dialup dsl minecraft social
tilde nihongo europa webmail gallery usermap teach irc tutorials software telnet ssh

Survival TECO

Version 2.0

You can perform useful editing with TECO, the venerable, line-noise-for-command-language Editor that Time Forgot, knowing just 3 rules and 16 commands.

Rules

  1. Pressing the Escape key (shown as $ below — not a dollar sign) twice executes typed commands instead of the Enter key. (A single $ terminates string arguments for some commands.)
  2. Commands don't have to be executed one-at-a-time. You can type a long series of commands then "$ $" and TECO will execute the commands in order.
  3. TECO is character-oriented, so it remembers the character position of your current location in the file, called "pointer". Most commands display or change the file's contents at pointer, or move pointer to another location in the file.

Commands

1.ERfile$Y1Open file for input 9.JJump to beginning of file
2.EWfile$1Open file for output 10.ZJJump to end of file
3.EXSave and exit 11.T3Type from pointer to end of line
4.^C ^CExit (no save) 12.VType current line
5.C2Move character forward 13.D2Delete character at pointer
6.R2Move character backward 14.K3Delete current line
7.L3Move to beginning of next line 15.Stext$Search for text
8.Itext$Insert text 16.FStext1$text2$Substitute text2 for text1
1Some versions of TECO accept a file name as a command line argument, making 1. and 2. unnecessary. Some versions of TECO have a command EBfile$Y that does the same as 1. and 2. in one step.
2Numeric prefix: move/delete multiple characters (negative reverses direction)
3Numeric prefix: move/type/delete multiple lines (negative reverses direction); (T, K only) prefix H: type/delete whole file

TECO on SDF

SDF cluster
TE is a port of the Ultrix version of TECO. It is actually a visual editor that displays file contents around pointer after commansds are submitted, so you won't need to use type/display commands as much (TE automatic display sometimes gets a little wonky, so you occassionally need a T or a V as a last resort). TE takses a file name as a command line argument, so you don't need ER/EW/EB commands..
TWENEX
TECO on the TOPS-20 system at twenex.org is one of the original implementations of the editor. No command line arguments, so read and write your file with commands ER and EW. And no wimpy visual stuff, so enter your own display commands if you can't remember where you left pointer.

Using TECO seems unnatural at first, but with a little effort invested in learning the basic commands above, it's quite useful and fun! Perhaps the ultimate retro editor.


The previous version of this tutorial is available here.

"You can hack anything you want with TECO ..."

$Id: survival-teco-2.0.html,v 1.4 2015/11/24 18:49:54 papa Exp $

©1987-2065 SDF Public Access UNIX System, Inc. 501(c)(7)
(this page was generated using ksh, sed and awk)