1

I'm currently using yyp or yy(n)p to duplicate lines. Can I do it without yanking lines?

3 Answers3

3

If you use :co. then the " register will be left alone.

Josh Lee
  • 149,877
  • 34
  • 253
  • 263
1

View Duplicate a whole line in Vim

Explicitly the not so upvoted answers (like :t.). - but why not yyp?

Community
  • 1
  • 1
r00tandy
  • 714
  • 7
  • 12
0

You can delete the line with dd and then paste (put) it with p multiple times. E.g. 2p to duplicate.

jonasjacek
  • 135
  • 1
  • 9