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

Re: Cycling Through Previously yanks

Expand Messages
  • rb@raphinou.com
    ... I ve got the other behaviour, if doing this: yy dd p The line deleted by dd is put, and not the line yanked. Or did I misundertand something? Raph -- Free
    Message 1 of 11 , Aug 1, 2002
    View Source
    • 0 Attachment
      > This is an often overlooked feature. When you delete text, you may or may
      > not want to paste it in later. You only yank text with the intention of pasting
      > it. Thus it is good design that yanks are not overwritten by deletes.

      I've got the other behaviour,
      if doing this:
      yy
      dd
      p

      The line deleted by dd is put, and not the line yanked.
      Or did I misundertand something?

      Raph


      --
      Free and Open Source Developers' European Meeting
      http://www.fosdem.org
    • Benji Fisher
      ... That s right. Try yy dd 0p So you get the most recent (yank or delete) most easily, from the unnamed (default or ) register, but you can get the most
      Message 2 of 11 , Aug 1, 2002
      View Source
      • 0 Attachment
        rb@... wrote:
        >
        > > This is an often overlooked feature. When you delete text, you may or may
        > > not want to paste it in later. You only yank text with the intention of pasting
        > > it. Thus it is good design that yanks are not overwritten by deletes.
        >
        > I've got the other behaviour,
        > if doing this:
        > yy
        > dd
        > p
        >
        > The line deleted by dd is put, and not the line yanked.
        > Or did I misundertand something?

        That's right. Try

        yy
        dd
        "0p

        So you get the most recent (yank or delete) most easily, from the unnamed
        (default or "") register, but you can get the most recent yank (not delete)
        using the "0 register.

        :help "0

        HTH --Benji Fisher
      • David Fishburn
        Benji made responded to this thread ... To get the most recent yank back... yy dd 0p So you get the most recent (yank or delete) most easily, from the unnamed
        Message 3 of 11 , Aug 14, 2002
        View Source
        • 0 Attachment
          Benji made responded to this thread ...


          To get the most recent yank back...
          yy
          dd
          "0p

          So you get the most recent (yank or delete) most easily, from the
          unnamed (default or "") register, but you can get the most recent yank
          (not delete) using the "0 register.

          :help "0

          HTH --Benji Fisher
        • David Fishburn
          (oops, previous sent my mistake....) Benji made responded to this thread ... To cycle through deletes, you can do the following... dd dd dd dd 1P... or
          Message 4 of 11 , Aug 14, 2002
          View Source
          • 0 Attachment
            (oops, previous sent my mistake....)

            Benji made responded to this thread ...


            To cycle through deletes, you can do the following...
            dd
            dd
            dd
            dd
            "1P...

            or (instead of the last line)

            "1Pu.u.u.

            :help undo-remarks


            To get the most recent yank back...
            yy
            dd
            "0p

            So you get the most recent (yank or delete) most easily, from the
            unnamed (default or "") register, but you can get the most recent yank
            (not delete) using the "0 register.

            :help "0



            I have read through the help, but there does not seem to be any
            mechanism similar to "1P... For the 0 register. I just wanted to
            confirm there is no way to cycle through previous "unnamed" yanks.

            Thanks,
            Dave
          • Benji Fisher
            ... AFAIK that is right. You will have to name your yanks if you want this. HTH --Benji Fisher
            Message 5 of 11 , Aug 16, 2002
            View Source
            • 0 Attachment
              David Fishburn wrote:
              >
              > I have read through the help, but there does not seem to be any
              > mechanism similar to "1P... For the 0 register. I just wanted to
              > confirm there is no way to cycle through previous "unnamed" yanks.

              AFAIK that is right. You will have to name your yanks if you want this.

              HTH --Benji Fisher
            Your message has been successfully submitted and would be delivered to recipients shortly.