-*-Text-*- This is the file INFO;TINTRO >, which contains information on how to get started using Teco. This is NOT full documentation. It is an intro to the bare essentials.  File: TINTRO, Node: Top, Up: (DIR), Next: Preliminary This is a structured intro to learning to use the Teco text editor in a very basic way. It is not intended to be full documentation. If you need help in using INFO, "?" will get you a brief refresher listing all the commands, and "H" will show you a primer. If this is your first use of INFO, you should definitely type "H". To exit INFO type "Q". * Menu: * Preliminary:: Read this before you read anything else. * Args:: Argument passing conventions * Basic:: Basic command set  File: TINTRO, Node: Preliminary, Up: Top, Next: Args Before we get started, some preliminary notes. Make sure you understand these things before moving on to the rest of this section. (1) There is a TECO command which uses angle-brackets, "<" and ">". Unless specifically noted in this file, all occurances of those characters in this file denote conceptual quantities to be supplied by the user. When they are used in this manner, do not type the < or >, or the text in between, but rather replace the whole entity with what it seems to be asking you to supply. (2) The notation ^ (uparrow followed by a character), means a control-character. eg, ^A means control-A (hold the control-key and type ). (3) All "$" characters in this text are unless otherwise noted. The key is the key marked ESC, SEL, or ALT, and usually appears somewhere on the far left of the keyboard, toward the top. Keyboards with no key, should use control-right-bracket (^[). Keyboards with both an and and key (eg, the Knight TV keyboards used by the MIT AI-Lab) should ONLY use the Altmode key - ESCAPE in that case will do something totally different and undesirable.  File: TINTRO, Node: Args, Up: Top, Next: (???) Most Teco commands are a single character or cluster of characters. In order to get a Teco command to do something useful, you must often give it additional information, so you should next learn about argument passing conventions in Teco. * Menu: * Numeric Args:: * String Args::  File: TINTRO, Node: Numeric Args, Up: Args , Next: String Args Numeric args to Teco commands may take either of two positions: 'precomma' or 'postcomma'. Either or both numeric args may be omitted. Most commands will do different things, depending on the number and position of the args they are supplied. The syntax for these args is: -- no args. , -- single (precomma) arg. -- single (postcomma) arg. , -- both pre- and postcomma args. Note that single, precomma args are rarely used, so if documentation refers to a single arg being required by a command, the type of arg is meant to be postcomma (ie, no comma needed) unless explicitly stated otherwise. For example, the Teco command to move down a line, is 'l'. So typing '3l' will pass an arg of 3 to the 'l' command, which happens to interpret this as meaning 'move down 3 lines'. Negative args and args of 0 are also legal. Args are read in the default input base. This should be base-10 for normal use. An arg may be identified as base-8 by typing a "." (after the number - ie, an 'octal' point). Thus, 12. = 10 in Teco.  File: TINTRO, Node: String Args, Up: Args String args ...  Non-numeric args to a command, such as strings for searches, etc. follow the command and are terminated with an . Example, the "s" command searches for a string, so "ssomething$" will search for the string 'something'. Teco Commands are separated by an . Two 's will terminate a command line and begin its execution. On a display terminal, Teco will divide up the screens into windows. The top 3/4 of the screen, approximately, will display the text currently being editted. The bottom 1/4 will be used as an 'echo area' where the user sees the things he types into Teco. Naturally, the two (numeric and string) can be combined as in 3l$sHi There!$$ which will tell teco to go down three lines and search from their forward to the end of the buffer for a string of 'Hi There!' ... The er command [stands for external read] sets the file default for an input, and @y yanks in the file, so to read a file into teco, do er$@y$$ where is in the form ":; ". Similarly, to write a file, the command [note: there are several ways -- these are the simplest if you don't want to know much more than you need] is ":ew" to set your write default and "ee" to do the writing. Example: :ew$ee$$ The results of your editting will not display on your tty without explicitly being told to by the 'type' command, "t", which prints the text from the cursor thru the remainder of the line. If you don't know where you are on the line, the command 0lt$$ will move to the beginning of the line and type the line very easily. other useful commands are ... I Insert a char whose decimal-value of ascii is . I$ Insert the string . C Move forward characters. can be neg to move backward, but the "R" command will move back in fewer keystrokes. R Move backward characters. K Kill to the th end-of-line (including the carriage-return and line-feed). 0K Kill to start of line. :K Kill to end-of-line but keep the carriage-return and line-feed. D Delete characters (after cursor). S$ Search for string . (Negative means search backward. Search terminates at the end of string searched for or 'beeps' if it fails.) L Move down N lines. 0L Move to start of line. :L Move to end of line. J Move to top of buffer. ZJ Move to the end of the buffer FWR Move right (left with negative) one word. ZK Kill from cursor to end of buffer. Commands pertaining to printing terminals HT to type out the whole buffer 0TT to type out the current line (without moving the cursor) 0LT to type out the current line (moving cursor to beginning of line) nTT to type out n lines :^N to automatically type out lines each time two altmodes are typed You can quit, or cancel command string typed (but not executed yet) by typing a . There is a mechanism for looping available for looping if you need it but I don't know enough about it to just come up with it on the spur of the moment. Also, commands that cannot take string args needn't be followed with to separate them from other commands (though two 's are needed to terminate a command string in all cases). Example ... j3lsfoo$3r3dibar$$ is the same as j$3l$sfoo$3r$3d$ibar$$ which says in english Jump to top of buffer and then down three lines. Search for the string 'foo', go back 3 chars and delete 3 chars (deleting acts on chars following the cursor, so it will delete 'foo') and insert 'bar'. Full TECO documentation can be gotten by reading the file ".INFO.;TECO ORDER" It's quite long, however, so be ready. At 300baud, it'll take about 35mins per 10K and at last look this file was 40K long... -kmp