The XC editor on UNIX: Part 4.2

Editing an Existing File

  1. Restart the XC editor by typing
              xc census.data
    and pressing the ENTER or RETURN key. The screen will be filled with the text you previously typed. It will display only the first 17 lines of the file.

  2. Add lines to your file. On the command line, type
              bottom
    and press the ENTER or RETURN key to move to the last line of the file. Then type
              input
    and press the ENTER or RETURN key.

    Type the following lines as you did in the previous section.

              MA<TAB>NE<TAB><TAB>6016          
              RI<TAB>NE<TAB><TAB>1003          
              CT<TAB>NE<TAB><TAB>3287          
              NY<TAB>MA<TAB><TAB>17990          
              NJ<TAB>MA<TAB><TAB>7730          
              PA<TAB>MA<TAB><TAB>11882
    When you are finished, remember to press the ENTER or RETURN key twice to leave insert mode and return to command mode.

    XC uses the "current line" (the line directly above the scale) as its reference point. The current line is marked by ")))))". The "input" command tells XC to insert the lines you type after the current line. When you first start XC, the top of the file is the current line. To change the current line, you can type any of the following commands on the command line
               bottom     makes the last line of the file the current line
    top makes the top of your file the current line
    down n moves the current line n lines down (e.g., down 20)
    up n moves the current line n lines up (e.g., up 8)
    :n moves the current line to line n (e.g., :7)

  3. Make changes to your file. There are three ways to move around in your file and make changes to it:

    In the next few steps, you can try all three methods.

  4. Practice moving around and making changes to your file using the arrow keys.

  5. Try some of the prefix area commands. Move the cursor to any position in the five-column prefix area of the line
              GA  South     6478
    (Hint: Press CTRL-A to move quickly to the next line's prefix area.)

  6. Use some XC commands from the command lines at the bottom of the screen. Note that you must leave at least one blank after the command line's arrow (====>). If you don't, XC will make the terminal beep.

  7. Quit the XC editor. To save the changes, type
              file
    on the command line and press the ENTER or RETURN key. Remember, to quit without saving the changes, type
              qquit
    instead and press the ENTER or RETURN key.

XC Text Editor Guide index

University of Delaware