On 11/23/06, Daniel Nogradi <[EMAIL PROTECTED]> wrote:
Hi vimmers!

I often find myself in need of copying (yanking) non-consecutive
multiple lines so that I can paste them somewhere else in a
consecutive way. Several lines are scattered around the file and would
like to collect them kind of.

At the moment I go to to first line, yank it, go to the destination
position, paste it, look for the second line, yank it, go to the
destination position, paste it after the already pasted line, etc.

Is it possible to yank a line (or character or block of text) and then
yank something else in a way that the second yanking does not
overwrite the previously yanked stuff but adds to it? So that a
subsequent paste would paste both?

What I do in such case, is this. I copy selected lines
lines to the end of file with :.t$, or even better, with this
have mapping that copies current line to the end of file
and retutns to the original position:

:nmap <f2>  ms:.t$<cr>'s

After I collected all needed lines to the end of file, I go to end of file
and I move all lines into the final place with :m command.
I like it better that collecting to register because I can see what is in there
(near end-of-file, that is).

Yakov

Reply via email to