Tuesday, October 8, 2013

Re: yanking non-contiguous lines?

On 09:09 Tue 08 Oct , Dimitar DIMITROV wrote:
> >Assuming Vim without plugins like YankRing or the like, what is the
> >fastest way to copy non-contiguous lines to another place in the
> >document, such as a document:
> >
> >    AAA
> >    BBB
> >    CCC
> >    DDD
> >
> >That I want to become
> >
> >  AAA
> >  BBB
> >  CCC
> >  DDD
> >
> >  AAA
> >  CCC
> >  DDD
> >
> >Thanks!
> >
> >c
> >--
> >Chris Lott <chris@chrislott.org>
>
> This is what I would do:
>
> qaq to clear register a then go to every line you want and copy it with "Ayy (capital A for appending)
> Eventually, I would use "ap to paste
>
> Regards
>
> Dimitar

Cool way of clearing a register, I used
:let @a=''
for that 'qaq' is much nicer.

Thanks!
Marcin

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: