If you can see this check that

next section prev section up prev page next page

Copying Text

To copy a few lines of text, you can use the yank command (yy) with the put command.


This is the first line of text.
This is the second line of text.
This is the third line of text.
This is the fourth line of text.

To duplicate the above lines of text you can proceed as follows:

  1. Position the cursor anywhere on the first line.
  2. Type the following command to copy the four lines of text: 4yy
  3. Move the cursor down to the fourth line.
  4. Type p (lower case) to put the copied lines immediately below the fourth line.

You should now see the following:


This is the first line of text.
This is the second line of text.
This is the third line of text.
This is the fourth line of text.
This is the first line of text.
This is the second line of text.
This is the third line of text.
This is the fourth line of text.

yy
Yank (copy) the current line
nyy
Yank the next n lines
yw
Yank a copy of a word

Tutlinks: intro1 intro2 wildcard permission pipe vi essential admin net fwall DNS diag Apache1 Apache2 MySQL1 MySQL2
Useful: Quiz Forums
Site Links:XMLZoo ActiveSQL ProgZoo SQLZoo