- Choosing an Editor: nano/pico or vi/vim
- Starting nano and Dabbling with It
- Saving in nano
- Cutting and Pasting Text Blocks in nano
- Checking Spelling in nano
- Getting Help in nano
- Exiting nano
- Starting vi (or vim) and Dabbling with It
- Saving in vi
- Adding and Deleting Text in vi
- Importing Files into vi
- Searching and Replacing in vi
- Exiting vi
Cutting and Pasting Text Blocks in nano
As you’re typing along in nano, you’ll probably need to cut and paste blocks of text, as shown in .
To cut and paste text in nano:
nano hairyspiders
At the shell prompt, type nano 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 .
-
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.