Last Updated: February 25, 2016
· jandudulski

VimTip#3: yank and paste in place

If you want to copy a line and paste in the same file you can simply run:


Which means copy line number 10 and put it here (. means current line). You can pass any number instead dot of course.

Vim also has a shorter synonym for a copy command which is just t, so you can run:


If you're using relativenumber you can use them too:


At last, but not least - if you don't like numbers, you can just search!