How do I use The Hessling Editor?

The Hessling Editor (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 Mansfield Software KEDIT. THE was originally written to be used by people already familiar with the above editors. For this reason, there is limited information on using THE. Greater emphasis is placed on reference materials, such as command syntax and configuration.

Getting Started

There are two derivations available: text mode and X11. To start the text mode version, enter:

the file_to_create_or_edit

or

x file_to_create_or_edit

To start the X11 port of the editor, enter:

xthe file_to_create_or_edit

When using the X11 version, you may need to set the environmental variable DISPLAY to the hostname of the remote machine from which you are accessing argo. To get that hostname, run the command:

who -ml | awk '{print $6}'

Whatever appears between the opening and closing parenthesis is the hostname. The command that you use to set the DISPLAY variable is dictated by your SHELL script. If you are using the Bash shell, then the appropriate command is export DISPLAY; if the C shell, then setenv. For example, if your hostname is jsmith.cc.uic.edu, then in Bash use:

export DISPLAY=jsmith.cc.uic.edu

Or in C shell use:

setenv DISPLAY jsmith.cc.uic.edu​

Basics

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

  • a window (the filearea) which displays the contents of the file being edited,
  • a command line from which commands may be issued,
  • a prefix area which shows line numbers and from which prefix commands can be issued,
  • an idline which displays the file name, row/col etc. for the current file, and
  • a status line which indicates global status info like number of files being editted, time etc.

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.

Default Profile

Various session defaults may be changed on startup for an individual by using a profile file. A profile is used to:

  • set the current environment, including key bindings, and
  • process commands in batch mode.

If you do not tell THE to use a specific profile via the -p command line option, or do not have your own profile in your home directory. THE will use the default profile. If you wish to have your own profile for THE, perhaps to define special keys or to override system settings, you start by copying the default profile to your home directory:

cp /usr/local/share/THE/.therc ~$HOME

From now on, THE will use the .therc file in your home directory as its profile. You can make any additions or changes to it. A profile file can be used to process commands in batch mode. For example, 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 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.

Obtaining Help

Help inside THE is available by pressing the F1 key or typing help (capital letters may be used) at the command line and pressing the Enter key.

The THE man page may be accessed at the command line or at the UNIX prompt. At either location, type 'man the' (don't include the quotes) and strike the enter key. The THE man page is a very long document; there are hundreds of pages of information. Instead of scrolling through each page, you may search for a topic by keyword. Invoke the THE man page: the first page is displayed and the cursor appears in the lower left corner of the screen. You are now expected to strike the enter key to display the next page. Instead, strike the forward slash key (/). After the slash, type the keyword that describes the topic or command you want to find and strike the enter key. A screen containing the first occurrence of that keyword appears. You may continue to search for subsequent occurrences of that keyword by again striking the forward slash and then hitting the enter key. Or, you may type a new keyword.

For additional information visit The Hessling Editor reference page at Sourceforge or download The Hessling Editor reference manual [pdf].

There is a mailing list of THE users and installers. To subscribe to the list, send an email to listserv@uiuc.edu. The body of the note should contain the following:

SUBSCRIBE THELIST Name

where Name is your nameOnce you are subscribed, you will be able to ask others for help. You might even get an answer from the author himself; Mark Hessling is a member.

Need help?

Last updated: 

October 08, 2012

Browse by tag