The Pico Editor

The Pico Editor is a user-friendly text editor on many LINUX and UNIX computers. It can be used for creating or editing files. The most common commands are listed at the bottom of the pico screen. The ^ symbol stands for the Control key.

To open a file in the pico text editor type:

pico filename

For example, if you have the hello.cpp program in your account, type the following command:

pico hello.cpp

Here is the Pico text editor screen with the hello.cpp file displayed:

In pico, you can move up, down, left or right using the arrows on your keyboard. If you are working locally and not via ssh or telnet it may be possible to use the mouse — consult the man page for details.

To edit, you can backspace over text and then enter new text. You can also delete an entire row of text at once time using Ctrl-k.

Copy and Paste is done using Ctrl-k to cut then Ctrl-u to paste. Ctrl-u may be repeated as desired. You can select a region to cut by pressing Ctrl-Shift-6 (Ctrl-^).

To jump to a specific line either start pico like this pico +n filename where n is the line you want, or type Ctrl-W Ctrl-T and type your line number while editing.

To exit from pico, Ctrl-x will do.

Creating a New File:

To create a new file using the pico editor, type at the command prompt:

pico newfilename.cpp

A blank pico editor session will display. Add C++ code to create a new program. When you save the file, it will be given the filename that you entered in the command above.