Make Pico the Default Text Editor for UNIX

Conventions Used in this Solution: The word "current," when used in reference to some unit of text, refers to where the cursor is--e.g. current position, line, word or character. This document also uses different font styles to clarify the meaning of the text.

Bold Courier text: Indicates words or characters you must type in

Italic text: Used as a general word or phrase for which you must substitute a specific example (e.g. for file name you might substitute myfile)

Bold text: Used for section headers and to signal buttons or parts of the interface that you will interact with.


This document is intended to provide you with the basic information you need to use the pico text editor on the Computer Lab UNIX account. This document assumes that you are using your account from some kind of terminal window - either by connecting from home, or using a Macintosh or PC in a computer lab, or in an University office or by using a terminal window generated by the "xterm" program on a UNIX/Linux workstation. For more information visit the site on Terminal Applications which explains how to connect to the a host computers using a terminal program.

Note: Access to the Computer Labs at the University is restricted. You must have a valid Directory ID to use the labs.

Why Use Pico?

When using your UNIX account, you will find that there are three popular editing tools available for creating or modifying text files: vi, emacs, and pico. Unlike vi or emacs, the pico display-oriented text editor was developed for the sake of "simplicity in editing".

Pico (for PINE COmposer) was developed from the UNIX Emacs editor and designed for use with the pine mail system. Though PINE has its own documentation, this document intends to summarize as well as elaborate on the basic features of Pico.

The Pico editor is the easiest editor to use when you want to edit the files on your account. When using your account, you can set up a default editor for use with programs (such as the newsreader tin) in which you need to create or modify text. For more information on making Pico your default editor, see the Making Pico Your Default Editor section of this document.

Note: For more information about using UNIX, refer to Getting Started With your TerpConnect or Grace UNIX Account.

Making Pico Your Default Editor

Pico is the easiest editor to use when you want to edit the files on your account. It is also the easiest to use in other text-entry situations, such as posting an article to a Usenet newsgroup. To make sure your favorite newsreader lets you use Pico for this purpose, you must make Pico your default editor. Pico is the default editor on TerpConnect.

If you wish to make Pico your default editor on a non-TerpConnect system, you will need to edit one of the files that controls how the account operates.

These files begin with a period (referred to as "dot" in most UNIX documentation). The .cshrc file is one of the most important, since it configures many things in your account when you log in. To make Pico your default editor, add two lines to the end of your .cshrc file. Start by typing:

pico .cshrc

at a UNIX system prompt to enter the .cshrc file. Then, use the arrow keys (or type ^V) to move to the end of the file. Once you are on a blank line, use the correct spacing and letter case to type in the following two lines:

setenv EDITOR /usr/local/bin/pico

setenv VISUAL /usr/local/bin/pico

Press Enter at the end of each line. When you have finished, type ^X (Exit). When you are prompted to save the modified buffer, type y for yes. You will then be asked for a file name, and .cshrc will appear as the default. Press Enter to accept the default file name .cshrc. After you press Enter, your file will be saved and you will back at the UNIX system prompt.

This change won't take effect until the next time you log on, unless you re-execute the .cshrc file by typing:

source .cshrc

Note: On TerpConnect accounts, apply changes to the .environment file. On other systems, changes are typically set in the .login or .cshrc files.