File Contains:
aa bb cc dd I need:
aa aa bb bb cc cc dd dd How can I do this??
You can do this with a regex:
%s/.*/& &/ ^ you can just :%s/.*/& &.Perhaps there's a more clever way, but I would just enter visual block selection mode: ctrl+v, go to the last line: G, select all the way to the right: $, and yank: y.
Then you'll end up back at the first line. Press A to begin inserting at the end of the first line. Enter a space, leave insert mode and press p to paste in what you previously yanked.
set virtualedit=all and you can paste the block where ever you want without working about inserting extra white-space.I'd use a macro. Go to the top of the file, start recording with qq, then do whatever to duplicate the first line. Maybe YpkJ, or really anything that works to turn "aa" into "aa aa". Then stop recording with q again.
To apply to the rest of the buffer, use :2,$norm @q, or use visual mode to select all the lines until the end, and type :norm @q.