Dump of existing HTML tutorials into docuwiki format by the HTML::WikiConverter::DokuWiki Perl module. Useful for moving things from HTML tutes to the wiki at the SDF wiki. Convert script and source HTML also provided.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tutes-dump/dump/survival-teco-2.0.html.docu...

38 lines
3.1 KiB

====== 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 =====
- 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.)
- 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.
- 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. | ER//file//**$**Y[[#n1|<sup>1</sup>]] | Open //file// for input | 9. | J | Jump to beginning of file |
| 2. | EW//file//**$**[[#n1|<sup>1</sup>]] | Open //file// for output | 10. | ZJ | Jump to end of file |
| 3. | EX | Save and exit | 11. | T[[#n3|<sup>3</sup>]] | Type from pointer to end of line |
| 4. | **^C ^C** | Exit (no save) | 12. | V | Type current line |
| 5. | C[[#n2|<sup>2</sup>]] | Move character forward | 13. | D[[#n2|<sup>2</sup>]] | Delete character at pointer |
| 6. | R[[#n2|<sup>2</sup>]] | Move character backward | 14. | K[[#n3|<sup>3</sup>]] | Delete current line |
| 7. | L[[#n3|<sup>3</sup>]] | Move to beginning of next line | 15. | S//text//**$** | Search for //text// |
| 8. | I//text//**$** | Insert //text// | 16. | FS//text1//**$**//text2//**$** | Substitute //text2// for //text1// |
| [[|<sup>1</sup>]] | Some versions of TECO accept a file name as a command line argument, making 1. and 2. unnecessary. Some versions of TECO have a command EB//file//**$**Y that does the same as 1. and 2. in one step. |
| [[|<sup>2</sup>]] | Numeric prefix: move/delete multiple characters (negative reverses direction) |
| [[|<sup>3</sup>]] | Numeric prefix: move/type/delete multiple lines (negative reverses direction); (T, K only) prefix **H**: type/delete whole file |
===== TECO on SDF =====
SDF clusterTE 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..TWENEXTECO 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 [[/?tutorials//survival-teco|here]].
//"You can hack anything you want with TECO ..."//