How to use Pico

Pico is a text editor program similar to Windows Notepad (or Wordpad). Though it is a much simpler
editor than say Microsoft Word, it does have some useful abilities and it also has some quirks. Just
so you know, the "cursor" is the little black square indicating where you are about to type. Ctrl-D
and^D are abbreviations for Control-D which means that you press control key and the letter 'd' at the
same time (lower case d or upper case is fine).
- To start pico, just type pico at the grove prompt (after logging in via telnet). If you
want to edit a specific file then type pico filename where filename is the full name of
the file you want to edit (for example pico index.html is a command you will use a lot, by the
way make sure you are in public_html directory first). If the file does not exist it will be created
automaticlly. Pico has nothing to do with permissions (look at UNIX
Permissions for those).
Some of the common pico commands are (note these are all control letter combinations):
- ^O saves the file you are editing. It will bring up a line at the bottom of the screen with
the current filename in it, provided you want to keep that name (which you almost always will) just hit
the enter key. It will then print a message at the bottom like "[ Wrote 10 lines ]"
- ^X exits pico. If you have changed the file since you last saved it, it will ask, "Save modified
buffer (ANSWERING "No" WILL DESTROY CHANGES) ?" which just means do you want to save your changes. If
you do hit the letter 'y' otherwise hit the letter 'n'. If you chose to save the file you will print
the same line as ^O does about the filename (usually just hit enter).
- ^K cuts one line of text at a time. Note: it cuts the whole line the cursor is on. (This is the
"cut" of "cut & paste". If you press ^K several times you will cut several lines together as a
block. If you hit anything other then ^K then you have ended that block.
- ^U uncuts (pastes) whatever was last cut (using ^K). If you last cut several lines, then this will
paste all those lines. You can use ^U again to copy the text again.
- ^Y is the equivalent of page up.
- ^V is the equivalent of page down.
- ^W Where is, ie search. When you press ^W you will be asked (at the bottom) something like "Search
[]:" type in a word to search for. If you press ^W followed by ^T you will be asked for a line number
(in your file) to go to (useful for correcting errors reported by the HTML
Checker). ^W then ^Y takes you to the top of your file, ^W ^V takes you to the bottom.
- ^C will tell you what line (and what character) you are on. Within the other commands (like ^W) ^C
will act like "cancel" (this is true in most unix commands and programs, not just pico).
- ^A moves the cursor to the beginning of the line.
- ^E moves the cursor to the end of the line.
- ^G gets help (^X exits, ^V goes to the next page).
- First of all the mouse doesn't work in pico. This means you can't click on a letter to put the
cursor there, you will have to use the arrow keys on the keyboard (the mouse does have a use that we
will show you later).
- NEVER press Ctrl-S as it usually locks up telnet.
- One bad thing is that the "delete" doesn't work. You can either use the backspace key (which
erases the character to the left of the cursor) or Ctrl-D which erases the character at the cursor.
- If you want to copy and paste only a part of the line you will need to use telnets copy & paste
abilities. Highlight with the mouse the text you want to copy (can be several lines), then in the bar
at the top of the window click edit, then copy (or press Ctrl-Insert, or maybe Alt-C). Next, move the
cursor (with the mouse) to the place where you want to paste this text and click edit, paste (or press
Shift-Insert, or maybe Alt-V). The Alt-C and Alt-V shortcuts (press alternate key and the letter at the
same time, similar to Ctrl-C) only work in certain telnet programs.
Please send comments to CGS3063 STAFF