Publishers of technology books, eBooks, and videos for creative people

Home > Articles

  • Print
  • + Share This
This chapter is from the book

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 red_a.jpg.


Click to view larger image

red_a.jpg Marking, cutting, and pasting text in nano can be very handy.

To cut and paste text in nano:

  1. nano hairyspiders

    At the shell prompt, type nano followed by the name of the file to edit.

  2. Move the cursor to the first line of the text you want to cut.
  3. ctrl-cap.jpg

    Press ctrl-cap.jpg to mark the beginning of the text you want to cut. (Note that ctrl-cap.jpg is really ctrl-shift-6.jpg—it might work without Shift, but it might not, depending on your terminal program. Try it out and see what happens.)

  4. 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 gray_a.jpg.

  5. ctrl-k.jpg

    This “kuts” the text.

  6. Using the arrow keys, move the cursor to where you want to insert the cut text.
  7. ctrl-u.jpg

    Use this key combination to paste the cut text into the file at the new location.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.