||This is the ellars.com pico how-to. If you would like to know more about pico, click here.
||Jump to a part of this page:
save and exit
||You access pico from a UNIX terminal command line. (Think of the old C-prompt in DOS.) This could be in a telnet window, an X-terminal, or on the monitor of a UNIX servier itself. From the command line, type
||Once you are in pico, you should see the screen divided into three sections. The top of the screen is the title bar. It lists the program name (
Most of the screen is taken up by the second section, which displays the contents of the file you have chosen to edit. (If you just typed
The last two lines of the screen display the "Help Bar," the third and final section. All of the commonly used commands are listed here for your convenience. The little carrat symbol (
||Movement is accomplished primarily through the arrow keys. However, it is possible to quickly scroll up or down by using ^Y (page-up) or ^U (page-down). You can also fast forward to the end of a line by pressing ^E; to get to the beginning of the current line, press ^A.
||The search feature in pico is not terribly advanced, but it gets the job done. You access it by pressing ^W (for "where is"). The help bar is temporarily replaced by the
You can also use the search command (^W) to quickly jump to the beginning or end of the current file. Simply press ^W, followed by ^Y to jump to the start of the file; ^W and ^V to jump to the end.
||Cutting and pasting within pico is probably the least pleasant part of the program. The two commands are ^K and ^U. ^K cuts the entire current line, regardless of the cursor position. ^U pastes the cut text back at the cursor's current position and inserts a line break at the end.
You can cut more than one line of text at a time by simply pressing ^K as many times as you need. Note, however, that pressing ^K after moving the cursor in any way will replace the "clipboard" rather than add to it!
If you just need to cut a small portion of a line, or if you need to cut more than a few lines, you can "mark" the text. Begin by placing the cursor at the beginning of the text to be marked. Then press ^^ (control+shift+6 on most keyboards). Next, move the cursor to the end of the text to be marked. You will notice that the marked text appears in reversed colors (black on white instead of white on black, for example). Lastly, press ^K to cut the marked text. This method is especially powerful when used in conjunction with ^U and ^Y.
|save and exit
||When you are done with your changes, you can either save them and keep working, or save and exit pine. To save the changes and keep working, press ^O. You should see the
||Other commonly used commands allow you to insert other files into the current one, check the file for spelling, and justify the text.
To read in a file, press ^R. This presents you with a prompt similar to the search prompt. If you know the path and name of the file, you can type it in here and press
The dictionary used for spell-checking in pico is not terribly great, but it catches a lot of common spelling mistakes. (There is a way to define your own dictionary for pico to use; ask your system administrator ofr more information.) pico goes through possible spelling errors alphabetically; that is, all errors that start with the letter "a," then "b," and so on. Lowercase letters are searched first, then uppercase letters, then numbers.
To justify text, press ^J. This usually doesn't work the way I want it to work, so I generally avoid using it. (It works best when you are dealing with prose text -- paragraphs -- and tends to handle formatted code very poorly.)
^A move to beginning of line ^B move backwards 1 character ^C current location of cursor ^D delete under cursor ^E move to end of line ^F move forward 1 character ^G help text ^H backspace ^I insert tab ^J justify paragraph ^K cut line or marked text ^L refresh screen ^M line break (return) ^N move down 1 line ^O save file ^P move up 1 line ^Q enable screen output ^R insert file ^S suspend screen output ^T spell check ^U paste cut text ^V page down ^W search ^X save and exit ^Y page up ^^ mark text NOTE: ^Z is the UNIX suspend command, but it only works if suspend_enabled is selected... Don't ask...