- Choosing an Editor
- Starting pico and Dabbling with It
- Saving in pico
- Cutting and Pasting Text Blocks in pico
- Checking Spelling in pico
- Getting Help in pico
- Exiting pico
- Starting vi and Dabbling with It
- Saving in vi
- Adding and Deleting Text in vi
- Importing Files into vi
- Searching and Replacing in vi
- Exiting vi
- Starting emacs and Dabbling with It
- Using emacs Menus to Spell-Check
- Saving in emacs
- Exiting emacs
Cutting and Pasting Text Blocks in pico
As you're typing along in pico, you'll probably need to cut and paste blocks of text, as shown in Figure 4.6.
Figure 4.6 Marking, cutting, and pasting text in pico can be very handy.
To cut and paste text in pico:
pico hairyspiders
At the shell prompt, type pico followed by the name of the file to edit.
- Move the cursor to the first line of the text you want to cut.
-
Press to mark the beginning of the text you want to cut. (Note that is really —it might work without Shift, but it might not, depending on your terminal program. Try it out and see what happens.)
Use the arrow keys to move the cursor to the end of the text you want to cut.
Note that the text gets highlighted as you select it (Figure 4.6).
-
This "kuts" the text.
- Using the arrow keys, move the cursor to where you want to insert the cut text.
-
Use this key combination to paste the cut text into the file at the new location.