The Pico Text Editor
Introduction
Pico is a text editor suited to working in UNIX from the PCs It is not
as powerful as the PC window-based editor, as it does not rely on the mouse,
but still has many useful features.
Most pico commands are invoked by holding down the CTRL key
(that is, the control key), and pressing one of the other keys. In this
text, the control key is referred to using ^. For example, ^X means
``hold down the CTRL key and press the x key''.
To get help when running pico, use ^G. Most of the important
commands are also listed at the bottom of your screen.
Invoking pico
To edit a file called filename, type pico filename.
You can also pull an existing file into pico by using ^R. You
will then be prompted for the file to read, which will be inserted at the
current cursor position.
Navigation
The usual mouse-based point-and-click method is not supported by pico.
Instead, you may use the arrow keys to move around the page in pico.
The following commands are also useful:
^Y |
move down a page |
^V |
move up a page |
You can use ^C to find out what line the cursor is currently
on. This is useful if the compiler tells you that there is an error
at a particular line.
To search for some text, use ^W. You will be prompted
for the text to search for. It searches from the current cursor position,
wrapping back up to the top if necessary.
Editing
As with most text editors, you can insert new text at the current
cursor position just by typing the text in.
To delete a character, move the cursor to it and use ^D.
You can also move to the character after it and press the BackSpace
key.
You can also delete an entire line at a time by using ^K.
Cut and paste
^K does not delete lines permanently; the most recent set of deletions
are stored in a buffer. These lines may be re-inserted at the current cursor
loaction using ^U. This may be used to simulate cut and paste:
-
Repeatedly use ^K until all of the text you want to move has been
deleted.
-
Move to the line that you want to insert the text at, and use ^U.
Note that pressing ^U more than once will cause multiple copies
to be inserted. This is particularly useful if you want to copy
text:
-
Repeatedly use ^K until all of the text you want to copy has been
deleted.
-
Press ^U immediately to put a copy back in its original location.
-
Move to the line that you want to copy the text to, and use ^U.
Saving and Exiting
To save the current contents of the editor without exiting, use
^O. You will then be prompted for the file to save to. You can either
type it in, or use ^T to get a list of files and directories.
To exit pico, use ^X. If you have not saved your file,
you will be prompted to do so.