The XC editor on UNIX: Part 4.1

Creating a New File

  1. Log on to Strauss. You should have previously performed the UNIX configuration changes described above in the Preliminary Configuration section. Use XC to create a new file named "census.data". Type
              xc census.data
    and press the ENTER or RETURN key. Since this is a new file, the XC display will look like this:

    The first line of the screen displays information about the file being edited. Directly under this line is a "message line". XC displays an error message on this line when you make a mistake. The "scale" is displayed two lines later to help you find column locations. Just above the scale, ")))))" marks the line called the "current line". At the lower-left corner, a large arrow (====>) marks the command line. You type XC commands at the command line. If you try to type in the first space after the arrow, XC will beep until you move the cursor further to the right.

  2. Tell XC that you want to enter text. With the cursor on the command line, type
              input
    and press the ENTER or RETURN key. The screen will look like this:

  3. READ THIS SECTION BEFORE TYPING ANYTHING. It describes keys you need to make corrections to the text you include in a file.
    Note: If you are using telnet, HyperTerminal or Kermit on a microcomputer with an Ethernet card, the keys that perform "character-delete" and "destructive backspace" functions depend on two factors--which program you're using, and how the corresponding configuration (.ini) files have been set up. Most terminal emulation software allows you to define these keys' functions.
    The "character-delete" key should be one of the keys or key-combinations listed below; when you press this key, the character on which the cursor is placed is deleted. Test them to determine which applies to your configuration.
    BACKSPACE key on the main keyboard. (The Backspace key is sometimes marked with an arrow pointing to the left on the keycap.)

    CTRL-BACKSPACE key combination. (Press the BACKSPACE key while holding down the CTRL key.) Macintosh users should also try the OPTION-BACKSPACE key combination.

    DELETE (DEL) key in the cluster of special keys near the top of the keyboard.

    The LEFT-ARROW key is always a "non-destructive backspace" key, meaning that the cursor will move to the left without deleting any characters. The non-destructive backspace function may also be performed using the BACKSPACE key or the CTRL-BACKSPACE key combination.

    Pressing the ESC key followed by the I key allows you to toggle between insert mode (characters are placed to the left of the cursor postion and existing characters move to the right) and overwrite mode (characters are typed over existing characters). The INSERT (INS) key may also perform that function, depending on your configuration.

    Other terminal emulation programs (e.g., Crosstalk) may allow you to make key assignments for the character-delete and non-destructive backspace functions. These assignments are typically set in a configuration file or via a pull-down menu labeled "Terminal Preferences" or "Settings."

    If none of the suggestions for these keys works, call the Information Technologies Help Center at 831-6000.

  4. Starting at line 1, type the lines of data listed below, pressing the ENTER or RETURN key at the end of each line. The symbol <TAB> represents the TAB key. The data are the state name, region, and population (in thousands) from the 1990 US Decennial Census. If you make a mistake, use the LEFT-ARROW key to move the cursor and the character-delete key to eliminate unwanted characters. You can also correct mistakes later using the editing techniques you'll learn.

    Do not type any text on the command line (marked "====>") at the bottom-left corner of the screen. You should only type XC commands on that line.

              DE<TAB>South<TAB>666
              MD<TAB>South<TAB>4781
              DC<TAB>South<TAB>607
              VA<TAB>South<TAB>6187
              WV<TAB>South<TAB>1793
              NC<TAB>South<TAB>6629
              SC<TAB>South<TAB>3487
              GA<TAB>South<TAB>6478
              FL<TAB>South<TAB>12938
              KY<TAB>South<TAB>3685
              TN<TAB>South<TAB>4877
              AL<TAB>South<TAB>4041
              MS<TAB>South<TAB>2573
              AR<TAB>South<TAB>2351
              LA<TAB>South<TAB>4220
              OK<TAB>South<TAB>3146
              TX<TAB>South<TAB>16987
    When you press the ENTER or RETURN key at the end of the next line, the screen will clear and open up space for the next 18 lines. Type another line:
              ME<TAB>NE<TAB><TAB>1228
    and press the ENTER or RETURN key. Finally, type the last two lines:
              NH<TAB>NE<TAB><TAB>1109
              VT<TAB>NE<TAB><TAB>563
    When you finish typing this last line, press the ENTER or RETURN key twice to leave "input mode" and return to "command mode." The cursor will move to the command line.

  5. Save your work in the permanent disk file named "census.data". Type the XC command
              file
    on the command line, and press the ENTER or RETURN key. The XC program will terminate and return you to the UNIX prompt (%).

XC Text Editor Guide index

University of Delaware