Using the Unix Text Editor Pico

This document provides instructions for using the Unix text editor Pico, a command-based text editor, on the ITS Login Service (login.itd.umich.edu).

Opening Pico

  1. Connect to the ITS Login Service (login.itd.umich.edu) using a secure system.

    Windows: Use PuTTY software. For information about obtaining and using PuTTY, see Use PuTTY to Connect to Host Computers [Windows] .

    Mac OS X: Mac OS X comes with SSH software called Terminal. Open the Applications folder, then the Utilities folder to find it. Open Terminal and type this command:
    ssh login.itd.umich.edu
    The Blue Disc installs an icon in your dock that you can click to connect to the Login Service.

  2. Log in with your uniqname and UMICH password.

  3. At the % prompt, type pico and press ENTER, or RETURN.

  4. Pico opens a buffer (temporary storage for any text you type). Start typing text or use any of Pico's commands.

    description of the screenshot

Commands Use the Control Key

You issue most commands in Pico by holding down CONTROL and typing a letter. A caret (^) is used to indicate the Control key. To issue the Get Help command (^G), for example, hold down CONTROL and type g.

Marking, Cutting, and Pasting

The mouse is not used to select text in Pico. Mark the text to cut instead. The command for marking text is ^^. The first ^ indicates that you should hold down CONTROL. The second ^ means to type a caret (Shift-6).

The mark feature (^^) allows you to mark any segment of text, cut it out (^K), move the cursor, and paste the text (^U) in the new location.

Commands That Move Your Cursor

Command What the Command Lets You Do
Arrow keys Move cursor up, down, to the right, and to the left.
Delete/ Backspace key Move cursor back one space.
^A Move cursor to beginning of line.
^B Move cursor back one character.
^E Move cursor to end of line.
^F Move cursor forward one character.
^N Move cursor to next line.
^P Move cursor to previous line.
^V Move cursor forward a page of text.
^Y Move cursor backward a page of text.
^-space Move cursor to next word.

Other Commands

Command What the Command Lets You Do
^C Report current cursor position.
^D Delete the character at the cursor position.
^G Display the Pico help file.
^H Delete previous character.
^I Insert a tab at the current cursor position.
^J Reformat the text in the paragraph the cursor is on so that it is left-justified and the right margin is ragged (a paragraph is separated by one blank line). Useful when you are editing a paragraph and the lines become uneven.
^K Cut marked text or current line.
^L Redraw screen.
^O Output current buffer to file, saving it.
^R Insert text from an existing file. Pico prompts you for the name of a file in your IFS home directory. You can then type ^T to see a list of files in your home directory. Use the arrow keys to navigate to the file you want, and then press Return to read in the selected file.
^T Check the spelling in the file you are composing. You will be prompted at the bottom of the screen with each misspelled word. You can correct the word, then press Return to change it in the text. If you don't want to change the spelling of a word flagged by the spell checker, press Return to continue the spell check. If a word is misspelled more than once, you will be prompted to confirm the correction of each occurrence.
^U Undelete the last line, series of lines, or marked block you deleted. Using Mark (^^), Cut (^K), and Undelete (^U) is a convenient way to move text to a new location in your file. Also, ^U can be used to "unjustify" the last justification.
^W Search the file for a string of characters. The cursor stops right before the first occurrence of the string. The search will wrap to the beginning of the file when it no longer finds matching strings. To search for the same string a second time, press ^W to begin search and then press Return to accept the previous search string shown in square brackets instead of entering a new one.
^X Exit Pico. You'll be prompted whether to save the buffer (your changes).
^^ Mark cursor position at the beginning of the selected text. Used to set a mark and then perform a delete/move operation on a block of text.

Exiting Pico

  1. Use the Exit command (^X) to exit Pico. You'll be prompted to indicate whether you want to save your changes.

  2. At the % prompt, type logout and press ENTER or RETURN to log out of the ITS Login Service.

  3. Quit or Exit your secure connection software.

Tags: 
Last Updated: 
Thursday, March 20, 2014