Skip Navigation Links 

U of A University Information Technology Services

Was this page helpful?
 [+]





...Or log into AskIT
and request help.

 

Pico

Pico is available as a simple text editor in the style of the Pine Composer on comp.uark.edu and cavern.uark.edu. You can use Pico to edit HTML web pages or any other plain text document online.

Read a comparison of Pico to the vi editor which is also available on comp and cavern, vi vs. Pico.

To use Pico, at the cavern% or comp% prompt, type:
pico filename
("filename" is the actual filename that you want to name the file) which will create and name the file initially or open a pre-existing file in the current directory (then "filename" is the name of an existing file) or just type:
pico
to create a new text file in your account which you can name before exiting.

Note: If Pico cannot be located using your account, use the full path to open:
/usr/local/bin/pico
or
/usr/local/bin/pico filename

To fix this issue on your account of having to type the full path, contact our comp and cavern server admins by calling 575-2905 or by creating an AskIT case.

Pico is designed to be a simple, easy-to-use text editor with a layout very similar to the Pine mailer. The status line at the top of the display shows Pico's version, the current file being edited and whether or not there are outstanding modifications that have not been saved. The third line from the bottom is used to report informational messages and for additional command input. The bottom two lines list the available editing commands.

Each character typed is automatically inserted into the buffer at the current cursor position. Editing commands and cursor movement (besides arrow keys) are given to pico by typing special control-key sequences. A caret, '^', is used to denote the control key, sometimes marked "CTRL", so the CTRL-q key combination is written as ^Q.

The following functions are available in pico:

^G - Display this help text.
^F - move Forward a character.
^B - move Backward a 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 forward a page of text.
^Y - move backward a page of text.
^W - Search for (where is) text, neglecting case.
^L - Refresh the display.
^D - Delete the character at the cursor position.
^^ - Mark cursor position as beginning of selected text.
Note: Setting mark when already set unselects text.
^K - Cut selected text (displayed in inverse characters).
Note: The selected text's boundary on the cursor side ends at the left edge of the cursor, so with selected text to the left of the cursor, the character under the cursor is not selected.
^U - Uncut (paste) last cut text inserting it at the current cursor position.
^I - Insert a tab at the current cursor position.
^J - Format (justify) the current paragraph.
Note: paragraphs delimited by blank lines or indentation.
^T - To invoke the spelling checker
^C - Report current cursor position
^R - Insert an external file at the current cursor position.
^O - Output the current buffer to a file, saving it.
^X - Exit pico, saving buffer.

The editor has four basic features: paragraph justification, case-insensitive searching, a spelling checker, and a file browser.

Paragraph justification takes place in the paragraph that contains the cursor, or, if the cursor is between lines, in the paragraph immediately below. Paragraphs are delimited by blank lines, or by lines beginning with a space or tab. Unjustification can be done immediately after justification using the control-U key combination.

String searches are not sensitive to case. A search begins at the current cursor position and wraps around the end of the text. The most recent search string is offered as the default in subsequent searches.

The spell checker examines all words in the text. It then offers, in turn, each misspelled word for correction while simultaneously highlighting it in the text. Spell checking can be cancelled at any time. Alternatively, pico will substitute for the default spell checking routine a routine defined by the SPELL environment variable. The replacement routine should read standard input and write standard output.

The file browser is offered as an option in the "Read File" and "Write Out" command prompts. It is intended to help in searching for specific files and navigating directory hierarchies. Filenames with sizes and names of directories in the current working directory are presented for selection. The current working directory is displayed on the top line of the display while the list of available commands takes up the bottom two. Several basic file manipulation functions are supported: file renaming, copying, and deletion.

More specific help is available in pico's online help.

Options

Syntax

pico [-f] [+n] [-nn] [-t] [-v] [-w] [-z] [file]

+n Causes pico to be started with the cursor located n lines into the file.
Note: no space between "+" sign and number

-nn The -nn option enables new mail notification. The n argument is optional, and specifies how often, in seconds, your mailbox is checked for new mail. For example, -n60 causes pico to check for new mail once every minute. The default interval is 180 seconds, while the minimum allowed is 30.
Note: no space between "+" sign and number

-t Enable "tool" mode. Intended for when pico is used as the editor within other tools (e.g., Elm, Pnews). Pico will not prompt for save on exit, and will not rename the buffer during the "Write Out" command.

-v View the file only, disallowing any editing.

-w Disable word wrap (thus allow editing of long lines).

-z Enable ^Z suspension of pico.

Lastly, when a running Pico is disconnected (i.e., receipt of a SIGHUP), Pico will save the current work if needed before exiting. Work is saved under the current filename with ".save" appended. If the current work is unnamed, it is saved under the filename "pico.save".

Bugs
The manner in which lines longer than the display width are dealt is not immediately obvious. Lines that continue beyond the edge of the display are indicated by a '$' character at the end of the line. Long lines are scrolled horizontally as the cursor moves through them.

Files
pico.save Unnamed interrupted work saved here
*.save Interrupted work is saved here

Authors
Michael Seibel, mikes@cac.washington.edu
Laurence Lundblade, lgl@cac.washington.edu
pico is originally derived from MicroEmacs 3.6

Pine and Pico are trademarks of the University of Washington.
No commercial use of these trademarks may be made without prior written permission of the University of Washington.

 

 

Thank you for visiting ITS. This page can be found at:
http://uits.uark.edu/main/unix/index_4258_ENG_HTML.htm
Follow us with RSS   Bookmark us using Add This   Follow us on facebook   Follow us on twitter   Follow Us