The XC editor on UNIX: Part 7

Working with Wide Files

XC is especially useful for viewing and editing files that are wider than 80 columns. In the case of an X terminal or terminal emulator whose working area can be stretched to be wider than 80 columns, XC detects the extra width and displays as many columns as possible.

On any terminal or microcomputer, you can tell XC to display a specific range of columns or to operate on a specific range of columns. This section describes five useful commands: "prefix", "right", "left", "verify" and "zone." These commands can be used with files of any width. They are explained further in the online help facility in XC.

prefix
Normally, XC displays a prefix area and a text area showing columns 1 to 74. To eliminate the prefix area, at the XC command line, .type
          prefix off
and press the ENTER or RETURN key. This eliminates the line numbers and the prefix area and instead displays columns 1 to 80 of the text area. To restore the prefix area, type
          prefix on
and press the ENTER or RETURN key.

right
left
Use the "right" and "left" commands to change the view of a wide file. To see an example of this, at the UNIX prompt, type
          xc  ~consult/demo/wide.data
and press the ENTER or RETURN key. At the XC command line, type
          right 70
and press the ENTER or RETURN key. The scale at the top of the screen shows that you are now viewing columns 71 to 144 (or columns 71 to 150 if the prefix area is turned off). Then type
          left 20
and press the ENTER or RETURN key to view columns 51 to 124.

You can also use ESC 0 and ESC - (PF10 and PF11) instead of "left 70" and "right 70". To reset the scale to begin with column 1, type

          right 0
and press the ENTER or RETURN key.

verify
This command specifies which columns to display on the screen. Continuing with the previous example, type
          verify on 71 80
and press ENTER or RETURN to display columns 71-80. Similarly, the command
          verify on 1 10  51 60
will display columns 1 to 10 followed immediately by columns 51 to 60.

XC commands such as "locate" and "change" continue to use the entire width of the file for searching and modification. The "verify" command only affects which columns you actually see.

To return to the default display settings,

          verify off
and press the ENTER or RETURN key.

zone
This command specifies which columns are acted upon when searching. For example, the commands
          zone 11 15
          locate /19711/
will search for "19711" in columns 11 to 15 only. Furthermore,
          zone 11 15
          change /19711/19716/ * *
will cause "19711" to be replaced by "19716" only if "19711" appears in columns 11 to 15.

To return to the default zone (the entire line), type

          zone 1 *
and press the ENTER or RETURN key.

XC Text Editor Guide index

University of Delaware