UMUC

Computing Resources

UNIX User's Guide > Text Editor

UMUC's UNIX systems have several text editors (ed, ex, vi, emacs, and pico). These editors vary in their range of features and ease of use. The ed, ex, and vi editors can be found on every UNIX system.

The ed and ex editors are very basic line-mode editors that do not offer a full-screen interface. You enter text one line at a time, and use commands to correct mistakes one at a time. You cannot simply move the cursor around the screen to correct mistakes.

The vi editor offers similar commands, as well as a screen-mode interface, but can be confusing to new users.

Emacs is an extremely powerful editor with a fairly steep learning curve. If you would like information on ed, ex, vi, or emacs, use the man command to view their manual pages. In the following paragraph, we'll focus on the pico editor.

Introduction to the Pico Editor

Pico (which is short for Pine-composer) was originally designed as a message editor for the Pine mail program. To start Pico, type Pico filename (where filename is the name of the file you want to edit). You'll see a status bar at the top of the screen, an area in the middle of the screen where you enter your text, and a list of available commands at the bottom of the screen. You'll notice that each command is prefaced with a caret (^). The caret indicates that you need to hold down the [CTRL] key while you hit the letter associated with the command. For example, to exit Pico you'd hold down the [CTRL] key and press x.

  Nova> Pico  
UW PICO(tm) 2.6     File: pico.instruct     Modified    

This is the display you'll see when you invoke the pico text editor. Notice that there is always a list of commands visible at the bottom of the screen, and help is always just a keystroke away. If the file you specify (in this case "pico.instruct") already exists, its contents will be displayed on the screen. If the file doesn't exist, there will be no text in the area between the status bar and the command list. Begin typing your text. Use the arrow keys to move the cursor around the screen when necessary. When you're finished editing the file, hit [CTRL]x to exit the editor. Answer yes to save the file.

^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where is ^V Next Pg ^U Uncut Text ^T To Spell

Computing Resources Home