Words

Stedi has a rudimentary knowledge of words allowing a number of word-oriented commands to be built in. For most purposes of the editor, a word is defined in one of two ways. A word is defined as either a string of alphanumeric characters delimited by a non-alphanumeric character or a single non-alphanumeric character of a certain class.

In order to make these definitions precise, let us separate the various characters into three classes:

  1. The first class, the `alphanumeric characters', consists of characters from the set a-z, A-Z, 0-9, _ and the special alphabetic characters in the character font that can be used in the various national character sets.

  2. The second class consists of some `in between' characters which are mainly punctuation characters. These are: ! "
    # $ % & ' ( ) * + , - . / @ [ \ ]
    ^ ` { | } ~ and $\Delta$. Sometimes they are seen as a word by themselves, regardless of the characters next to them.

  3. The third class of characters is considered to be 'whitespace' and cannot be part of a word. This class includes all control characters, blanks, tabs, carriage returns, linefeeds and all characters with an ASCII code greater than 7F that are not included in the first class.

It is possible to change the class of a character with the command

    set <char> = on/off/single
The value on puts the character in class 1, the value single puts it in class 2 and the value off puts it in class 3. Example:
    set <$> = on
    set <_> = single
This setting would be appropriate for Fortran. When the default file is written with the DW command (p. [*]) the `word settings' are also stored in it.

In stedi a word is defined to be either a string of class 1 characters delimited by characters from either class 2 or class 3 or a single character from class 2. Below, we will refer to the first of these definitions as a type 1 word and the second as a type 2 word.