tutes-dump/site-tutorials/survival-teco-2.0.html.bak

81 lines
4.3 KiB
HTML
Raw Permalink Normal View History

2020-07-11 06:11:19 -04:00
<style type="text/css">
@import url('http://sdf.org/tutorials/tutorials.css');
</style>
<h1>Survival TECO</h1>
<h6>Version 2.0</h6>
<p>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.</p>
<h2>Rules</h2>
<ol>
<li>Pressing the Escape key (shown as <strong>$</strong> below
&mdash; <strong>not</strong> a dollar sign) twice
executes typed commands instead of the Enter key. (A single
<strong>$</strong> terminates string arguments for some commands.)</li>
<li>Commands don't have to be executed one-at-a-time. You can type a
long series of commands then "<strong>$&nbsp;$</strong>" and TECO will
execute the commands in order.</li>
<li>TECO is character-oriented, so it remembers the character
position of your current location in the file, called
"<strong>pointer</strong>". Most commands display or change the file's
contents at pointer, or move pointer to another location in the file.</li>
</ol>
<h2>Commands</h2>
<table>
<tr>
<td>1.</td><td><samp>ER<em>file</em><strong>$</strong>Y</samp><a href="#n1"><sup>1</sup></a></td><td>Open <em>file</em> for input</td>
<td>9.</td><td><samp>J</samp></td><td>Jump to beginning of file</td>
</tr>
<tr>
<td>2.</td><td><samp>EW<em>file</em><strong>$</strong></samp><a href="#n1"><sup>1</sup></a></td><td>Open <em>file</em> for output</td>
<td>10.</td><td><samp>ZJ</samp></td><td>Jump to end of file</td>
</tr>
<tr><td>3.</td><td><samp>EX</samp></td><td>Save and exit</td>
<td>11.</td><td><samp>T</samp><a href="#n3"><sup>3</sup></a></td><td>Type from pointer to end of line</td>
</tr>
<tr>
<td>4.</td><td><samp><strong>^C ^C</strong></samp></td><td>Exit (no save)</td>
<td>12.</td><td><samp>V</samp></td><td>Type current line</td>
</tr>
<tr>
<td>5.</td><td><samp>C</samp><a href="#n2"><sup>2</sup></a></td><td>Move character forward</td>
<td>13.</td><td><samp>D</samp><a href="#n2"><sup>2</sup></a></td><td>Delete character at pointer</td>
</tr>
<tr>
<td>6.</td><td><samp>R</samp><a href="#n2"><sup>2</sup></a></td><td>Move character backward</td>
<td>14.</td><td><samp>K</samp><a href="#n3"><sup>3</sup></a></td><td>Delete current line</td>
</tr>
<tr>
<td>7.</td><td><samp>L</samp><a href="#n3"><sup>3</sup></a></td><td>Move to beginning of next line</td>
<td>15.</td><td><samp>S<em>text</em><strong>$</strong></samp></td><td>Search for <em>text</em></td>
</tr>
<tr>
<td>8.</td><td><samp>I<em>text</em><strong>$</strong></samp></td><td>Insert <em>text</em></td>
<td>16.</td><td><samp>FS<em>text1</em><strong>$</strong><em>text2</em><strong>$</strong></samp></td><td>Substitute <em>text2</em> for <em>text1</em></td>
</tr>
</table>
<table>
<tr><td style="vertical-align: top"><a id="n1"><sup>1</sup></a></td><td>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 <samp>EB<em>file</em><strong>$</strong>Y</samp> that does the same as 1. and 2. in one
step.</td></tr>
<tr><td style="vertical-align: top"><a id="n2"><sup>2</sup></a></td><td>Numeric prefix: move/delete multiple characters (negative reverses direction)</td></tr>
<tr><td style="vertical-align: top"><a id="n3"><sup>3</sup></a></td><td>Numeric prefix: move/type/delete multiple lines (negative reverses direction); (T, K only) prefix <strong>H</strong>: type/delete whole file</td></tr>
</table>
<h2>TECO on SDF</h2>
<dl>
<dt>SDF cluster</der<dt><dd><samp>TE</samp> 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..</dd>
<dt>TWENEX</dt><dd><samp>TECO</samp> on the TOPS-20 system at twenex.org is one of the original implementations of the editor.</dd>
</tddl>
<p>Using TECO seems unnatural at first, but with a little effort
invested in learning the basic commands above, its uite's quite useful and
fun! Perhaps the ultimate retro editor.</p>
<hr />
<p>The previous version of this tutorial is available
<a href="/?tutorials//survival-teco">here</a>.</p>
<p><em>"You can hack anything you want with TECO ..."</em></p>
$Id: survival-teco-2.0.html.bak,v 1.1 2019/12/06 20:50:52 thegiant Exp $