Using the Pico Editor

An editor for Unix

The pico editor
To create and edit files on the ubunix sunCluster system, you can use the text-editing program called "pico". Pico is a simple editor in which available options are displayed across the bottom of the screen.

To create or edit a file using pico, at the > sign, (the ubunix prompt), type:

     pico filename

and press the <return> key. Replace filename with the name of the file you want to create or edit.

Creating a new file
Here is an example of how to use pico to create a file named "testfile". Type:

     pico testfile

and press the <return> key. You should see a screen similar to the following:

In the upper-left corner of the screen, you will see the version of pico that you are using (e.g., PICO 2.5). To the right of the version number, you will see the name of the file that you are creating (e.g., File: testfile).

Across the bottom of the screen, you will see the options that are available to you. The "^" character represents the CONTROL key. To select one of these options, you must press the CONTROL key and the corresponding letter key at the same time. For example, to "Get Help," press the CONTROL key and the letter G key at the same time.

Type some text for the file. If you make a typographical error, you can use the BACKSPACE or DELETE key to delete a character to the left of the cursor. To delete a line ("Cut Text"), use the ^K option; to undelete a line ("UnCut Text"), use the ^U option.

Saving a new file

  • To prepare to save the file and exit pico, use the ^X ("Exit") option.
  • You will see the program message,
         Save modified buffer:(ANSWERING 'No' WILL  DESTROY CHANGES)?
  • Press the Y key.
  • You will see the program message,
         File Name to write : testfile
  • Press the <return> key. You will see a message indicating how many lines are included in the file.
  • Editing an existing file
  • To edit an existing file, at the ubunix prompt (>), type:

         pico filename

  • Press the <return> key. Replace filename with the name of the file you want to edit. After you make the editing changes you want, save the file again following the steps outlined above.

    Some editing options
    ^C, Cur Pos:
    ^G, Get Help:
    ^J, Justify:
    ^O, WriteOut:
    ^R, Read File:
    ^T, To Spell:
    ^V, Next Pg:
    ^W, Where is:
    ^Y, Prev Pg:
    determine where the cursor is in the file
    go to an online help menu
    justify the text in the entire paragraph
    save the text you've written without quitting pico
    include a previously written file in your current text
    check the spelling in the file
    move the cursor to the next page of the file
    search for character string patterns
    move to the previous page of the file

    Getting online help
    If you need help while you are working with pico, you can find online help at any point by pressing the appropriate "help" option displayed at the bottom of the screen (e.g., ^G to "Get Help"). You can get information about any of the available options using the online help.

    For more information on using Unix, see the Unix section of the CIT Documentation and Publications Index.

    bjz
    10/28/98
    Millard Fillmore College
    for use on unix


    Back to Courses Page