Wednesday, September 26, 2007

PCLinuxOS - Using pico for text editing

Probably you know that Linux stands for choice, freedom and innovation. That's the reason there are so many types for application for a single task. Take for example you have, gedit, kate, xpad, nano, pico, bla... bla... for text editing. (Except for vi, it's more than just a text editor) I have used the most popular text editors of modern Linux including gedit and kate. But I am nostalgic about pico, the good old text editor, which is still available to download (though nano has replaced it in most places).

pico text editor manual

click on the image for a better view

I like pico for two basic reasons, first, it's small, simple and fast, and second, though a cli application, it's not that much cryptic like vi.

Basic Operations

Pico displays a menu bar of commonly-used commands at the bottom of the screen. Pico accepts commands only from your keyboard but not from your mouse. You can create or edit an existing text file using pico. Just issue "pico filename" (replace the filename with the name of the file you want to create or edit).

  • Deleting text: To delete the character to the left of the cursor, press BACKSPACE, DELETE, or CTRL/h. To delete the character highlighted by the cursor, press CTRL/d. To delete the current line, press CTRL/k.
  • Cut and paste functions: Place the cursor on the first text line you wish to cut and press CTRL/k to remove it. To cut and paste two or more consecutive text lines, press CTRL/k until all the text lines are removed. Now move the cursor to the location where you want to paste the text. Press CTRL/u. Pico pastes the text back into the file at the new cursor position.
  • Cut and paste text blocks: Move the cursor over the first character of the text you want to remove. Press CTRL/^ to "set the mark." Use the arrow keys to highlight the text you wish to cut. Press CTRL/k to cut the text. (Be sure you got all of the text you wanted, including the last character.) Move the cursor to the place where you want to insert the text. Press CTRL/u to paste the text into the new position.
  • Inserting an existing text file: Place Ctrl/r to insert the contents of an existing file at the cursor location. Pico prompts you for a filename. You can either type the filename and press Return, or press Ctrl/t to select from a list of available files. To exit the File Browser, press e.
  • Spell checking: To use the spell checker, press CTRL/t. When Pico discovers a word it does not recognize, it highlights the word and prompts you to enter a replacement. You can either type a replacement or press RETURN to keep the original word. Pico then continues to the next misspelled word. When Pico has checked your entire document, it returns the cursor to its original position.
  • Recovering your work: Look in your working directory for a filename with the extension .save to recover the files if pico crashed.

Command Overview

  • CTRL/a----Move to the beginning of the current line.
  • CTRL/e----Move to the end of the current line.
  • CTRL/v----Move forward one page.
  • CTRL/y----Move backward one page.
  • CTRL/w----Search for text (whereis).
  • CTRL/L----Redraw a garbled screen.
  • CTRL/d----Delete the current character.
  • CTRL/^----Begin selecting text. *
  • CTRL/k----Remove (cut) current line or selected text.
  • CTRL/u----Paste (uncut) last cut text at the cursor position.
  • CTRL/u----Undo justify
  • CTRL/j----Format (justify) the current paragraph.
  • CTRL/t----Spell check the text.
  • CTRL/r----Insert (read in) a file into this file.
  • CTRL/o----Save (output) the file.
  • CTRL/g----View Pico's online help.
  • CTRL/x---Exit Pico, saving the file.
  • CTRL/f----Move cursor forward
  • CTRL/b----Move cursor backward
  • CTRL/n----Move cursor to next line
  • CTRL/p----Move cursor to previous line

3 comments:

meer said...

thanks for posting the pico guide. where can i get its rpm?

manmath sahu said...

here are the links to download pico:

ftp://fr2.rpmfind.net/linux/PLD/dists/ra/updates/security/i386/pico-4.58L-2.i386.rpm
ftp://ftp.task.gda.pl/vol/d0s0/ftp.pld-linux.org/dists/3.0/PLD/i486/RPMS/pico-4.64N-7.i486.rpm
ftp://ftp.task.gda.pl/vol/d0s0/ftp.pld-linux.org/dists/1.0/updates/security/i586/pico-4.58L-1.i586.rpm
ftp://ftp.icm.edu.pl/vol/rzm1/linux-pld-linux/dists/1.0/PLD/i386/PLD/RPMS/pico-4.44L-14.i386.rpm

If are unable to download any rpm of pico. Drop me mail. I will send you a pico package as an attachment.

Anonymous said...

better use nano, it's available in pclinuxos repository.

Share your thoughts