OHSU Library
How To: Use UNIX Text Editor - Pico

Notes: The vi editor is also available but a little more difficult to learn. Both editors may be used on sellwood or steele. To begin a new file type pico at the steele% or sellwood$ prompt. To edit a previously existing file, type pico followed by the file name. Example: pico genpaper.txt

Commands are executed by typing a letter while the Ctrl key is held down. When in PICO, the Ctrl key is symbolized by the ^.

When text is being edited, it is in a "buffer." When editing a previously existing file, PICO will show at the top the filename and an indicator that changes have been made to it in the buffer. Remember to save the contents of the buffer to the file when finished.

Ctrl-g
Go to Help Mode. To exit Help Mode, press Ctrl-x.


MOVING THE CURSOR

Ctrl-b or the back arrow key Jump to previous character (wrap at first character in the line).

Ctrl-f or the forward arrow key Jump to next character (wrap at first character in the line).

Ctrl-p or the up arrow key Jump to previous line (stays in a column if it exists).

Ctrl-n or the down arrow key Jump to next line (stays in a column if it exists).

Ctrl-a Jump to first character in line (never leaves line.)

Ctrl-e Jump to last char in line (never leaves line).

Ctrl-y Jump to previous page (cursor will be at home position).

Ctrl-v Jump to next page (cursor will be at home position).


CHANGING THE TEXT

Ctrl-^ Make current character the start of marked text. Repeating Ctrl-^ unmarks the text.

Ctrl-d Delete a character

Ctrl-h or backspace Delete previous character.

Ctrl-k Delete (kill) a line.

Ctrl-u Undelete (paste) lines deleted previously with Ctrl-k.

Ctrl-o Write (or output) current buffer to the file.

Ctrl-r Read an existing file into the current text. Ctrl-t at this point will list the files available.

Ctrl-j Justify a paragraph.

Ctrl-i Insert a tab at the current cursor position.


SPECIAL COMMANDS

Ctrl-c When a command has been issued Ctrl-c cancels it. If no command has been issued, Ctrl-c list the cursor position within the text (line number and character number).

Ctrl-t Check spelling from the cursor position on.

Ctrl-w Search the buffer for a word or partial word.

Ctrl-x Exit pico; prompt for saving the buffer if changes have been made to the text.

Ctrl-l Refresh the display.




Back to the top

OHSU Library 
navigation bar OHSU Library Home Need help? Ask a Librarian Search the OHSU 
Library Web site Contact us Catalog Databases Journals Electronic Books Course Reserves Services Request forms Interlibrary Loan Software licensing Off-campus access About the Library Hours/Locations Staff/Departments OGI S&E Library ONPRC Library What's New Listserv 
signup Consumer Health Historical Collections and 
Archives Digital Resources Library
Last updated September 19, 2008 by the OHSU Library Web Managers. Please send comments, questions, and reports of problems through the Library's customer support form.