Find the answer to your Linux question:
Results 1 to 3 of 3
Hey, I was wondering. I've never figured this one out... Say that I want to copy a block of text in vi editor. And then paste that block of text ...
  1. #1
    Just Joined!
    Join Date
    Jan 2006
    Posts
    43

    Exclamation vi - cut/paste block of text

    Hey,

    I was wondering. I've never figured this one out...

    Say that I want to copy a block of text in vi editor. And then paste that block of text to a different file, or even the same file. I am just wanting to copy a chunk of text and be able to paste it, not just one line - but several lines.

    Never had figured it out. Any ideas?

  2. #2
    Linux Newbie
    Join Date
    Aug 2006
    Posts
    107
    p inserts deleted text after the current cursor line
    P inserts deleted text before the current cursor line

    yy copies text
    5yy would copy five lines

    dd deletes files
    5dd would delete five lines

  3. #3
    Just Joined!
    Join Date
    Jan 2006
    Posts
    43
    Quote Originally Posted by deanlinkous
    p inserts deleted text after the current cursor line
    P inserts deleted text before the current cursor line

    yy copies text
    5yy would copy five lines

    dd deletes files
    5dd would delete five lines
    Nice. I appreciate that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •