Copy lines without a register
:2t$
Example
Normal mode. Lines 1–3: alpha, beta, gamma.
alpha
beta
gamma- :2t$<CR> Copy line 2 to the end · alpha, beta, gamma, beta
alpha
beta
gamma
betaDetails & Vim help
Duplicate a line directly to a destination address.
Copy a line while preserving your yank and delete registers.
The destination is the line after which the copy is inserted; address 0 means the start of the buffer. :t is an alias for :copy.
Try it in Vim
- In the example, type :2t$<CR>.
- 2 is the source line; $ means after the last line.
- Use a range, such as :2,4t0, to copy several lines before line 1.