THE

INTRODUCTION


THE is a text editor that uses both command line commands and key bindings to operate. It is intended to be similar to the VM/CMS System Product Editor, XEDIT and to KEDIT from Mansfield Software.

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.


LICENSE


THE (The Hessling Editor) is Copyright (C) 1990-2002 Mark Hessling

Permission is granted to copy, distribute and/or modify the software under the terms of the GNU GENERAL PUBLIC LICENSE, Version 2 or any later version published by the Free Software Foundation. See the file "COPYING" that is distributed with the software.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".


THE BASICS


The default screen displayed when THE starts consists of several areas:

When THE starts, the cursor is positioned on the command line . To move between the command line and the filearea , the CURSOR HOME command is used. By default this command is bound to the HOME key (under DOS and OS/2), the DO key (on vt220s) and HOME (on xterms).

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 next 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


COMMAND-LINE SWITCHES


THE recognises many command-line switches when starting THE. All switches are specified with a single - followed by a single character. The case of this character is relevant. Some switches take extra parameters; those that take optional extra parameters are indicated by the extra parameter being stated below in [] . The purpose of each of the switches is as follows:

After all the above switches are stated on the command line, THE treats the remainder of the command line as files or directories to edit.


PROFILE FILE


Various session defaults may be changed on startup for an individual by using a profile file. This file contains various commands that set the current environment, including key bindings. This profile file can also be used to process commands in batch mode.

THE will always try to execute a default profile unless specifically told not to with the -n command line switch. THE will look for an explicitly specified profile file and if this is not specified, THE will look for a default profile file as described below.

A profile file can be explicitly specified and will be processed in the following order: - -p command line switch - THE_PROFILE_FILE environment variable If the profile file specified above does not exits, THE will exit with an error.

If no explicit profile file is specified, THE will look for a default profile file as specified in Appendix 1 in the following order: - under Un*x type platforms; $HOME/.therc - under Un*x type platforms; file specified by --with-global-profile configure switch when built from source (if specified) - THE_HOME_DIR environment variable - the current directory

Appendix 1 defines the name of the default profile on different platforms.

An example of a profile might be to change all occurrences of alligator to crocodile in the file file.ext in batch mode, a profile file; prf.prf with the following commands would be used:

'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 (generally any non-alphabetic character not in the string itself) 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.


The HTML version of this manual was inspired by Judith Grobe Sachs


The Hessling Editor is Copyright © Mark Hessling, 1990-2011 <mark@rexx.org>

Return to Table of Contents