How do I copy a line in vi?

How do I copy a line in vi?
Answer
Copying lines into a buffer
  1. Press the ESC key to be sure you are in vi Command mode.
  2. Place the cursor on the line you wish to copy.
  3. Type yy to copy the line.
  4. Move the cursor to the place you wish to insert the copied line.
 

Tìm kiếm

Back
Top