This shows you the differences between two versions of the page.
| tutorials:survival-teco [2011/04/30 15:06] – created clemens | tutorials:survival-teco [2013/01/11 16:01] (current) – Add version string memnon | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Survival TECO ====== | ||
| + | Below is a subset of commands for minimal useful editing with TECO, the venerable command-based, | ||
| + | |||
| + | * Commands are executed by following them with the key sequence **Esc Esc** instead of **Enter**. An arbitrarily long sequence of commands can be entered and executed together. | ||
| + | * TECO doesn' | ||
| + | * TECO considers files containing form-feed characters (ASCII 0x0b, **^L**) to be composed of multiple pages with each page consisting of the text between form-feed characters or the beginning or end of the file. TECO will only read into the buffer and edit one page at a time. To edit a multi-page file, complete editing on the first page then use the **P** command to save the page to the output file, reinitialize the buffer, and read the next page from the input file. Once a page has been saved with the **P** command, it may not be revisited except by saving the entire file and restarting the editing process from the beginning. Repeat the process until all necessary pages have been edited. The **EX** command automatically copies any unedited pages in the input file to the output file before exiting. | ||
| + | |||
| + | ^ File I/O and Termination ^^ | ||
| + | | EB// | ||
| + | | ER// | ||
| + | | EW// | ||
| + | | Y | Initialize buffer and read from input file (one page) | | ||
| + | | P | Append buffer to output file, reinitialize buffer, read next **P**age from input file | | ||
| + | | EX | Write buffer to output file and **EX**it | | ||
| + | | **^C ^C** | Abandon buffer changes and exit | | ||
| + | ^ Movement ^^ | ||
| + | | [//n//]C | Move one///n// **C**haracter(s) forward | | ||
| + | | -[//n//]C\\ [//n//]R | Move one///n// **C**haracter(s) backward (**R**everse) | | ||
| + | | [//n//]L | Move to beginning of first/// | ||
| + | | -[//n//]L | Move to beginning of first/// | ||
| + | | 0L | Move to beginning of current line | | ||
| + | | :L | Move to end of current **L**ine | | ||
| + | | [//n//]J | **J**ump to first/// | ||
| + | | ZJ | **J**ump to end of buffer | | ||
| + | ^ Display ^^ | ||
| + | | [//n//]T | **T**ype from current position to end of current/// | ||
| + | | 0T | **T**ype from beginning of line to curent position | | ||
| + | | -[//n//]T | **T**ype one///n// preceding line(s) and current line up to position | | ||
| + | | HT | **T**ype whole buffer | | ||
| + | ^ Useful Combinations ^^ | ||
| + | | 0TT | Type current line (current position unchanged) | | ||
| + | | 0LT | Type current line, moving position to beginning of line | | ||
| + | ^ Insertion ^^ | ||
| + | | I// | ||
| + | ^ Deletion ^^ | ||
| + | | [//n//]D | **D**elete one///n// character(s) after position | | ||
| + | | -[//n//]D | **D**elete one///n// character(s) before position | | ||
| + | | [//n//]K | Delete from position through end of current/// | ||
| + | | -[//n//]K | Delete one///n// preceding lines to current position | | ||
| + | | 0K | Delete from beginning of current line to position | | ||
| + | | :K | Delete from position to end of current line leaving end-of-line | | ||
| + | | HK | Delete whole buffer | | ||
| + | ^ Search/ | ||
| + | | [// | ||
| + | | [// | ||
| + | ^ Copy/Paste ^^ | ||
| + | | [// | ||
| + | | G//q// | Insert text in register //q// into buffer at current position | | ||
| + | |||
| + | ===== References ===== | ||
| + | |||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | |||
| + | |||
| + | $Id: survival-teco.html, | ||