1

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

Umut Çağdaş Coşkun
  • 1,197
  • 2
  • 15
  • 33

3 Answers3

5

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

Josh Lee
  • 171,072
  • 38
  • 269
  • 275
1

View Duplicate a whole line in Vim

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

Community
  • 1
  • 1
r00tandy
  • 748
  • 7
  • 13
0

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

jonasjacek
  • 145
  • 1
  • 9