Office of Information Technology
Home

Calendar

Map
Home
Computing

Library

Search

Editing with pico

pico is an easy-to-use editor that in a number of respects resembles a simplified version of emacs. Although it lacks most of emacs' sophisticated functions, many users find that pico more than compensates for this because there is virtually no learning curve associated with its use. pico's most-used commands are always displayed for the user at the bottom of the screen, and help with other features is readily available and clearly delineated in short phrases. pico is also the default editor used by the pine email program. To get started, enter pico at the system prompt and press <RETURN> . Alternatively, follow pico with the name of the file you are editing before executing the command. You will see a status line at the top of your screen which shows, among other information, the name of the file you are working on. If you are starting a new file, most of the screen will be blank. This represents your editing buffer, which at this point is empty. Simply type in your text, noting that pico will "word wrap'' automatically, so that carriage returns are not necessary unless you want to break a line before reaching the right margin, or unless a blank line is to be inserted. As with other editors, you have the option of moving around in your file with the arrow keys, and also of erasing the character to the left of the cursor via the backspace key. pico's other editing functions are accomplished with control sequences. These are depicted using the caret (^) as the symbol for CTRL, the control key. Thus when pico refers to a command such as CTRL/X, the notation ^X is used.

The following functions are available under pico:

    ^G

    Display this help text.

    ^F

    Move forward a character.

    ^B

    Move backward a character.

    ^P

    Move to the previous line.

    ^N

    Move to the next line.

    ^A

    Move to the beginning of the current line.

    ^E

    Move to the end of the current line.

    ^V

    Move forward a page of text.

    ^Y

    Move backward a page of text.

    ^W

    Search for (where is) test, neglecting case.

    ^L

    Refresh the display.

    ^D

    Delete the character at the cursor position.

    ^^

    Mark cursor position as beginning of selected text. Note: Setting mark when already set unselects text.

    ^K

    Cut selected text (displayed in reverse image). Note: The selected text's boundary on the cursor side ends at the left edge of the cursor. So, with selected text to the left of the cursor, the character under the cursor is not selected.

    ^U

    Uncut (paste) last cut text inserting it at the current postion.

    ^I

    Insert a tab at the current cursor position.

    ^J

    Format (justify) the current paragraph.

    ^T

    To invoke the spelling checker.

    ^C

    Report current cursor position.

    ^R

    Insert an external file at the current cursor position.

    ^O

    Outputs the current buffer to a file, saving it.

    ^X

    Exit pico, saving buffer.

To accomplish pico's cut-and-paste function, use consecutive deletes (^K). This will write the deleted matter to a special buffer. A subsequent undelete (^U) will write the contents of the buffer at the current cursor position. Note also that where needed, pico will prompt you for relevant information; for example, if you use ^R to import a file into your buffer, pico will ask you for the file's name. You will also be asked whether you want to save your buffer (that is, write a permanent file) when you exit the editor. If you do, respond y.

Office of Information Technology • Main Office: ECS 125 • Phone: 410-455-3838 • Email: oit@umbc.edu