THE was originally written to be used by people already familiar with the above editors. For this reason, this document provides limited information on using THE, and concentrates more on reference material, such as command syntax and configuration.
To execute commands from the command line simply type the command and press the ENTER (or RETURN) key.
To determine what keys are bound to what commands, execute the SHOWKEY command from the command line . As you press each key, THE will respond with the name of the key and any commands bound to that key. To exit from the SHOWKEY command, press the spacebar.
Key bindings may be changed for the current session by using the DEFINE command. To keep key bindings between sessions, the DEFINE commands can be placed in a profile file, which is executed each time THE starts. For more information on this, see the section PROFILE FILE .
It is possible to make THE look and behave more like either XEDIT or KEDIT. See the SET COMPAT command for further information.
As mentioned before, this document provides little tutorial information. For those users who have a REXX enabled version of THE, a self-running demonstration macro is supplied which will provide a better explanation of the capabilities of THE, than any documentation could. To run this demonstration, start THE as follows:
the -p demo.the demo.txt
'c/alligator/crocodile/ * *'
'file'
and the command
the -b -p prf.prf file.ext
would be issued.
This changes the first string enclosed in delimiters (either /,\ or @) to the second string for every line (*) starting at the current line (0 initially) changing each occurrence on a line (*).
Maybe you only want to change a string after the first line that contains the string donkey , but only change the second occurrence of that string. The profile commands would then be:
'/donkey/'
'c/alligator/crocodile/ * 1 2'
'file'
The change command uses a target specification as its first parameter after the string details. A target can be a number of lines, an absolute line number, BLANK, ALL or a string.
Number of line targets consist of either a positive integer, for referencing lines toward the end of the file, negative for referencing toward the start of the file or * , which is all the remaining lines in the file or -* which is all lines toward the start of the file.
An absolute line number in the form of :n is the line number in a file, starting with line number 1.