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

Re: Yank all lines in a file

Expand Messages
  • David Ohlemacher
    1GvGy does not get the end of the last line. G just takes you to the first non-blank character of a line. I would use 1GvG$y -- David Ohlemacher Principle
    Message 1 of 11 , Aug 16, 2013
    • 0 Attachment
      1GvGy does not get the end of the last line. G just takes you to the
      first non-blank character of a line.

      I would use 1GvG$y


      --
      David Ohlemacher
      Principle Software Engineer
      Scientific Solutions Inc.
      99 Perimeter Rd Nashua New Hampshire 03063
      603-880-3784

      . o .
      . . o
      o o o

      --
      --
      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.
    • Gautam
      ... Is there a significant difference between using ggyG as against :%y ? I always use the former. - Gautam -- -- You received this message from the
      Message 2 of 11 , Aug 17, 2013
      • 0 Attachment
        On Saturday, August 17, 2013 1:21:13 AM UTC+2, Tim Chase wrote:
        > On 2013-08-17 01:03, Dominique Pellé wrote:
        >
        > > Another solution in 4 keystrokes:
        >
        > >
        >
        > > ggyG
        >
        >
        >
        > While this works, I tend to shirk it as I occasionally fly with
        >
        > 'nosol' set. It doesn't happen to impact it in this case, but the
        >
        > extra thought exertion isn't worth it for me, so I just use the
        >
        >
        >
        > :%y<enter>
        >
        >
        >
        > that you mention :-)
        >
        >
        >
        > -tim

        Is there a significant difference between using "ggyG" as against ":%y<enter>"?

        I always use the former.

        - Gautam

        --
        --
        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.
      • Tim Chase
        ... In exactly this case? Not really. However, as mentioned in another email, often my reason for yanking an entire document is to send it to the system
        Message 3 of 11 , Aug 17, 2013
        • 0 Attachment
          On 2013-08-17 01:15, Gautam wrote:
          > Is there a significant difference between using "ggyG" as against
          > ":%y<enter>"?
          >
          > I always use the former.

          In exactly this case? Not really.

          However, as mentioned in another email, often my reason for yanking
          an entire document is to send it to the system clipboard. In that
          case, it's a one-character difference:

          gg"+yG

          vs

          :%y+<enter>

          It's something that I do often enough that I've just defaulted to
          using the Ex command. For registers named with letters, it's a
          wash.

          Also, I like to keep my Ex skills sharp. ;-)

          -tim




          --
          --
          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.
        • Christian Brabandt
          Hi Tim! ... You aren t alone mate ;) regards, Christian -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the
          Message 4 of 11 , Aug 17, 2013
          • 0 Attachment
            Hi Tim!

            On Sa, 17 Aug 2013, Tim Chase wrote:

            > :%y+<enter>
            >
            > It's something that I do often enough that I've just defaulted to
            > using the Ex command. For registers named with letters, it's a
            > wash.
            >
            > Also, I like to keep my Ex skills sharp. ;-)

            You aren't alone mate ;)

            regards,
            Christian

            --
            --
            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.
          • Tony Mechelynck
            ... With a capital V (i.e. shift-v) it does, because that makes the visual mode linewise. ... Like Christian, I use :%y (or :%y+ to yank into the clipboard).
            Message 5 of 11 , Aug 17, 2013
            • 0 Attachment
              On 08/17/13 06:47, David Ohlemacher wrote:
              > 1GvGy does not get the end of the last line. G just takes you to the
              > first non-blank character of a line.

              With a capital V (i.e. shift-v) it does, because that makes the visual
              mode linewise.

              >
              > I would use 1GvG$y
              >
              >
              Like Christian, I use :%y (or :%y+ to yank into the clipboard).


              Best regards,
              Tony.
              --
              War is peace. Freedom is slavery. Ketchup is a vegetable.

              --
              --
              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.