The pico text editor

Pico is designed to be a simple, easy-to-use text editor. Commands are displayed at the bottom of the screen, and context-sensitive help is provided.

Starting pico

To start pico, at the UNIX prompt, type
	pico 
or
	pico filename
to edit an existing file. 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

Saving text

To save the text, type ^O (hold down the Ctrl key and press o). You will be prompted for the name of the file to write.
	File Name to write : _
Type in a name and press the Return key. If the file already exists, it will ask if you wish to overwrite the existing file before continuing.

A file browser is available by pressing ^T. (See the section on the file browser below)

Inserting a text file

To insert a text file, position the cursor at the point you wish to insert the text, and press ^R. You will then be prompted for the name of the file (and the path if it is not in your home directory)
	Insert file from home directory:
A file browser is available by pressing ^T. (See the section on the file browser below)

Sometimes, the text file that is inserted has lines longer than 80 characters (the standard width of the pico text editor). Lines longer than 80 characters will have a $ sign at the end of the line. To justify the lines, position the cursor in the offending paragraph and press ^J. Do this for all paragraphs containing long lines.

The File Browser

A file browser is available in pico for certain functions, e.g. inserting a file. If prompted for a file name, press ^T to invoke the file browser.

..          (parent dir)  acorn              (dir)  amiga              (dir)  
axhome             (dir)  bevis             8.0 KB  bin                (dir)  
bin.mips           (dir)  bluebook           (dir)  budget.as         3.3 KB  
calendar            0  B  CN20text.ps       966 KB  compile           957  B
docs               (dir)  dos                (dir)  excel              (dir)  
  
? Get Help   E Exit Brwsr R Rename     -   Back Pg  D Del File   M Make Copy  
S [Select]   G Goto Dir   W Where is   Spc Fwd Pg                             
Both directories and files are displayed. Press S or Return to select a file or directory. When a file is selected during the "Read File" command, it is inserted into edited text. Answering "yes" to the verification question after a directory is selected causes the contents of that directory to be displayed for selection.

The file named ".." is special, and means the "parent" of the directory being displayed. Select this directory to move upward in the directory tree.

Cutting and pasting text

To select text for cutting and pasting, use the arrow keys at the bottom of the keyboard to position the cursor at the start of the text you want to cut. Press ^6 to mark the start of the selected text, and use the cursor keys to highlight the required text.

To cut the highlighted text, press ^K. Move the cursor to the position you wish to paste the cut text and press ^U.

Hint: to copy rather than cut the text, highlight the text then cut and paste it in the same place. Then move the cursor to the position you wish to paste the cut text and press ^U.

Exiting pico

To exit pico, type ^X. If you have modified the text but forgotten to save the changes, pico will ask if you wish to save your work before exiting.
	Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ? _
Press y (Yes) to save your work. It will then prompt you for the name of the file to write. (See the previous section on saving text)

Command Summary

The following functions are available in pico.
^O   Write Out (similar to Save As...).
^R   Read File (insert file at the current cursor position).
^X   Exit pico (it will ask to save changes before quitting).

^W   Where is (search through text for a keyword), case insensitive.

^V   move forward page of text.
^Y   move backward a page of text.

^6   Mark cursor position as beginning of selected text.   
     Use the cursor keys to select (highlight) the text.
^K   Delete current line (or any selected text).
^U   Uncut (paste) last cut text inserting it at the 
     current cursor position.
     
^J   Format (justify) the current paragraph.
^T   Run the spell checker.

^G   Display the help text.