Documentation
pico
Documentation table of contents.
Introduction
pico is a user-friendly, display-oriented text editor recommended for its ease of use and quick startup time. Commands are displayed at the bottom of the screen and context-sensitive help is provided. pico is available on UBUnix.
Setting Up the Terminal
UNIX users: To use pico you must specify the type of terminal
you are using before you enter the editor. To set terminal type, use the
commands:
set term=termtype; tset
termtype is the type of your terminal
or terminal emulator. If you are in a Public Computing Area, or you are
unsure of your terminal type, just enter:
vt100
Starting pico
To start pico, enter:
pico filename
filename is the name of the file you want to edit. Each character typed is automatically inserted into the buffer at the current cursor position. Editing commands are entered using the control-key combinations.
Exiting pico
To exit from pico, press Ctrl x. If changes have been made to a file but have not been saved, pico asks if you want to save the changes. Respond to this query by typing y for yes, n for no, or pressing Ctrl c to cancel exiting from pico.
pico Screen Layout
The status line at the top of the display shows pico's version, the current file being edited, and whether 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.
pico Commands
Once you have entered the editor and text is displayed on the screen, you can move the cursor around the screen with some control-key sequences. You may also use the arrow keys on your terminal. The following functions are available in pico:
| Function | Description |
|---|---|
| Ctrl f | Moves forward a character |
| Ctrl b | Moves backward a character |
| Ctrl p | Moves to the previous line |
| Ctrl n | Moves to the next line |
| Ctrl a | Moves to the beginning of the current line |
| Ctrl e | Moves to the end of the current line |
| Ctrl v | Moves forward a page of text |
| Ctrl y | Moves backward a page of text |
| Ctrl w | Searches for where text is, ignoring case |
| Ctrl l | Refreshes the display |
| Ctrl d | Deletes the character at the cursor position |
| Ctrl k | Cuts (deletes) selected text |
| Ctrl t | Invokes the spelling checker |
| Ctrl r | Inserts an external file at the current cursor position |
| Ctrl o | Outputs the current buffer to a file, saving it |
| Ctrl x | Exits pico, saving buffer |
| Ctrl c | Reports current cursor position |
| Ctrl j | Formats (justifies) the current paragraph |
| Ctrl u | Pastes most recently cut text at the current cursor position (undoes) |
Paragraph Justification
Paragraph justification (Ctrl j) takes place in the paragraph that contains the cursor, or if the cursor is in 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 by using the Ctrl u key combination.
Searching and Replacing for String
String searches are not case-sensitive. 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.
Blocks of text can be moved, copied, or deleted with creative use of the commands for mark (Ctrl _ ), delete/cut(Ctrl k), and undelete/uncut (Ctrl u). Mark the beginning of the block of text (Ctrl _ ), move the cursor to the end of the block, cut the block (Ctrl k), move the cursor to the new insertion point, then paste the block of text (Ctrl u).
Spell Checker
The spell checker examines all words in the text. It highlights each misspelled word in the text. Spell checking can be cancelled at any time by pressing Ctrl c.
File Browser
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.
Navigating File Browser
After invoking Read, File, or Write Out commands, pico will ask you for a filename to insert or write. Use Ctrl t to invoke File Browser. Filenames with sizes and names of directories in your home directory are presented for selection. You can enter e to exit browser, g to change your working directory, s to select the file you want to insert or write, or other file manipulation functions. (See bottom two lines of the file browser display.)
After you enter g (go to your destination), 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 makes up the bottom two. Several basic file manipulation functions are supported: file renaming (r), copying (m), and deletion (d).
Command Line Options
| Options | Description |
|---|---|
| -v | Views the file only, disallowing any editing |
| -w | Disables word wrap (thus, allowing editing of long lines) |
| -z | Enables Ctrl z suspension of pico |
Example
The following command runs pico in View mode:
pico -v file
If you try altering the file, pico responds with Key illegal in VIEW mode.
Additional Information
To obtain information about pico, enter man pico at your UBUnix prompt. More specific help is available in pico's online help. Within pico, use Ctrl g to invoke online help.

