Brevis esse laboro, Obscurus fio -- I strive to be brief, and I become obscure.     CEE UCL HelpDesk Homepage

Department of Civil and Environmental Engineering
Frank Batten College of Engineering and Technology
Old Dominion University
Norfolk, Virginia 23529-0241, USA
Tel) (757) 683-3753
Fax) (757) 683-5354


	
Return to CEE UCL HelpDesk Homepage
CEE UCL HelpDesk Access Counter
 
How do I use Pico Text Editor?


  


  1. Overview
  2. Pico Command Key Summary




Overview
  
Well, there are three things in Unix (regardless of its flavor) that everyone (regardless of one's level of Unix knowledge) has very, very stong opinions (almost to a degree of either "madly in love" or "total abhorrence of") on -- a particular flavor of Unix (i.e., Solaris, BSD, AIX, linux, etc.), command shell (i.e., bash, tcsh, ksh, zsh, rc, etc.) and text editor. A common denominator for these three is usually which one you had started your first Unix experience from.

There are a variety of well-known Unix text editors such as vi, emacs, jove, etc. that each has its own levels of complexity (i.e., command keys), capability (i.e., shell functions and macro) and learning curve requirement. However, the biggest problem faced often by a Unix tenderfoot is that regardless of which editor -- how powerful and capable it might be -- it all looks so difficult to learn yet one desperately need a text editor! If you've been plagued by this same problem, Pico might be a reasonable solution (or a lesser evil) until you get really comfortable with the idiosynchracy of Unix. So, read on. :-)

Pico is a "simple," terminal-based (not X-window-based), easy-to-use text editor with a layout very similar to the Pine e-mailer. Commands are displayed at the bottom of the screen that free you from memorizing commands, and context-sensitive built-in help is always accessible from the same scree that you're in. As characters are typed they are immediately inserted into the text. Editing commands are entered using control-key combinations.

The editor has five basic features:

  1. paragraph justification
  2. searching
  3. block cut/paste
  4. a spelling checker
  5. a file browser

Note that if you use Pine e-mail program, you are already using the pico editor when you compose an e-mail message.

To start a pico session, type at the system prompt:

$ pico

or
$ pico foo

to edit/modiy an existing file, "foo." If "foo" does not exist, then you're creating a new file named "foo."

The status line at the top of the display shows pico's version, the current file being edited and whether or not there are outstanding modifications that have not been saved. The bottom two lines list the available editing commands. Additional informational messages (when you issue some command) will be displayed at third line from the bottom.





Pico Command Key Summary
  
Each character typed is automatically inserted into the buffer at the current cursor position. Editing commands and cursor movement (besides arrow keys) are given to pico by typing special control-key sequences. The following functions are available in pico.

"^" in the figure denotes a <Control> key, i.e., ^f is the same to <Ctrl> f



To do This Use
Display help text. <Ctrl> g
move Forward a character. <Ctrl> f
move Backward a character. <Ctrl> b
move to the Previous line. <Ctrl> p
move to the Next line. <Ctrl> n
move to the Beginning of the current line. <Ctrl> a
move to the End of the current line. <Ctrl> e
page Down. <Ctrl> v
page Up. <Ctrl> y
Search for (=where is) a string/text, not case sensitive. <Ctrl> w
Refresh the display. <Ctrl> l
Delete a Character at the cursor position. <Ctrl> d
Delete a Line at the cursor position. <Ctrl> k
Block select (for copy/delete) - Mark cursor position as beginning of selected text. It works like a toggle - setting mark again will unselects a text block. <Ctrl> ^
Cut/Copy selected text (displayed in inverse characters). 'Cut' means you are putting selected text into the memory buffer for later 'paste' compared to 'delete.' Of course, if you do not 'paste,' it becomes equivalent to 'delete.' <Ctrl> k
Uncut (=Paste) last cut text inserting it at the current cursor position. <Ctrl> u
Insert a Tab at the current cursor position. <Ctrl> i
Format (justify) the current paragraph. <Ctrl> j
To start the spelling checker <Ctrl> t
Report current cursor position (in line/column format). <Ctrl> c
Insert an external file at the current cursor position. <Ctrl> r
Output (=Save) the current buffer to a file. Equivalent to 'Save As.' <Ctrl> o
Exit pico. Pico will automatically ask whether you want to save the buffer if any modification was made. <Ctrl> x

Pine and Pico are trademarks of the University of Washington.


Return to CEE UCL HelpDesk Homepage Move to the Top of this page