140k views
1 vote
You are using vi to edit a file and have just entered 12 new lines. You need to replicate the same 12 lines right after you enter them. What command-mode command can you type to replicate the lines?

1) yy12p
2) dd12p
3) 12yy
4) 12dd

1 Answer

5 votes

Final answer:

To replicate the 12 lines you have just entered, you can use the command-mode command yy12p.

Step-by-step explanation:

To replicate the 12 lines you have just entered, you can use the command-mode command yy12p. This command will yank (copy) the 12 lines and then paste them immediately below where they were copied.

User RickMeasham
by
8.4k points