Pico

Pico is an application which allows you to create and edit text files. Pico is also the default editor for the Pine email and news reader. Pico is automatically invoked within Pine each time you compose an email message or newsgroup article.

Pico can also be used as a stand-alone text editor by typing pico filename at a Unix prompt. As all the avialable commands are listed across the bottom of the screen, Pico is one of the most user friendly text editors available on the Unix system.

Entering Text and Executing Commands

Each character typed is automatically inserted into the buffer at the current cursor position. Editing commands and cursor movement (besides arrow keys) are executed by typing special control-key sequences. A caret (^) is used to denote the control key, sometimes marked on the keyboard with the word Control or the letters CTRL. On the Pico menu, the key combination <Control>-q is written as ^Q, which means to hold down the <Control> key and then type q.

Moving Around

In addition to using the arrow keys, you can use the following keystrokes to move around in Pico:

^F Move forward one character
^B Move backwards one character
^P Move to the previous line
^N Move to the next line
^A Move to the beginning of the current line
^E Move to the end of the current line
^V Move one page forward
^Y Move one page backwards
^W^Y Move to the first line of the file
^W^V Move to the last line of the file

Deleting Text

To delete text while using pico, the following commands may be used:

BackSpace Delete the character to the left of the
cursor
Del Delete the character to the left of the cursor
^D Delete the character at the current cursor position

Cutting and Pasting Text

The following commands may be used when cutting and pasting text in pico:

^K Cut the entire line of text at the cursor
^U Paste the last cut line at the cursor

Saving a File

To save the current contents of the file you are editing, type ^O. You will see the following prompt:

    File Name to write:

Enter a file name. The buffer will be written to the specified filename in the current directory. If the file already exists, you will be asked if you want to overwrite the existing file. You can abort saving the file by typing ^C.

Inserting a Tab

To insert a tab at the current cursor position, press the Tab key or type ^I.

Inserting a File

To insert an external file at the current cursor position, type ^R. You will see the following prompt:

    Insert file from home directory

Type in a file name to have it inserted into your editing buffer between the line that the cursor is currently on and the line directly below it. You may abort inserting a file by typing ^C.

Justifying a Paragraph

To justify the current paragraph, type ^J.

Paragraphs are delimited by blank lines or indentation. To immediately unjustify the current paragraph, you can type ^U.

Spell Checking

To spell check your file, type ^T. The spell checker examines all words in the text in alphabetical order. It offers each misspelled word for correction while simultaneously highlighting it in the text. To leave a word unchanged simply press the Return button at the edit prompt. If a word has been corrected, each occurrence
of the incorrect word is offered for replacement. Spell checking can be cancelled at any time by typing ^C.

Searching for Text

To search for a string of text, type ^W. You will see the following prompt:

    Search:

Enter the words or characters you would like to search for, then press the Return button. The search then takes place. The text search is not case sensitive and will examine the entire buffer. When the characters or words that you entered are found, the buffer will be redisplayed with the cursor at the beginning of the selected text.

The most recent string for which a search was made is displayed in the Search: prompt between the square brackets. This string is the default search string. Pressing only the Return at the prompt will cause the search to be made with the default value. Should the search fail, a message will be displayed.

Miscellaneous

To refresh the display, type ^L.

To report current cursor position, type ^C. Pico will tell you what line and character you are on as well as the total number of lines and characters in the buffer.

Exiting Pico

To exit Pico and save the buffer, type ^X. You will see the following prompts:

    Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES)?
    File Name to write:

Respond with Y for yes, if you want to save your changes, then enter a file name or press the Return button to accept the default file name. The buffer will be written to the specified file in the current directory. If the file already exists, you will be asked if you want to overwrite the existing file. You can abort exiting Pico
by typing ^C.

Getting Help

To display the help text, type ^G.

If you have any questions regarding these commands, please contact the ITS Customer Support Center.