Loading ...
Sorry, an error occurred while loading the content.

Re: yanking non-contiguous lines?

Expand Messages
  • Dimitar DIMITROV
    ... 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
    Message 1 of 5 , Oct 8, 2013
    • 0 Attachment
      >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@...>

      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

      --
      --
      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@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Marcin Szamotulski
      ... Cool way of clearing a register, I used ... for that qaq is much nicer. Thanks! Marcin -- -- You received this message from the vim_use maillist. Do
      Message 2 of 5 , Oct 8, 2013
      • 0 Attachment
        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@...>
        >
        > 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@....
        For more options, visit https://groups.google.com/groups/opt_out.
      Your message has been successfully submitted and would be delivered to recipients shortly.