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

Mysterious yank.

Expand Messages
  • John Culleton
    If I type yy I yank one line. If I type 1y I get no lines. If I type 2y I yank three lines. So how does one yank exactly 2 lines? -- John Culleton Able
    Message 1 of 6 , Jan 1, 2003
    • 0 Attachment
      If I type "yy" I yank one line. If I type "1y" I get no lines. If I
      type "2y" I yank three lines.

      So how does one yank exactly 2 lines?
      --

      John Culleton
      Able Indexers and Typesetters
      Rowse Reviews
      Culleton Editorial Services
      http://wexfordpress.com
    • Antoine J. Mechelynck
      ... In normal mode, if I type yy I yank one line, if I type 2y I am still in operator-pending mode (waiting for entry of an object or motion), and if I type
      Message 2 of 6 , Jan 1, 2003
      • 0 Attachment
        John Culleton <john@...> wrote:
        > If I type "yy" I yank one line. If I type "1y" I get no lines. If I
        > type "2y" I yank three lines.
        >
        > So how does one yank exactly 2 lines?
        > --
        >
        > John Culleton
        > Able Indexers and Typesetters
        > Rowse Reviews
        > Culleton Editorial Services
        > http://wexfordpress.com

        In normal mode, if I type yy I yank one line, if I type 2y I am still in
        operator-pending mode (waiting for entry of an object or motion), and if I
        type 2yy (with at least one line below the cursor line) I yank two lines
        (the one at the cursor and the one below). I'm not sure what 1y does. Done
        it (2yy) lots of times.

        Tony.
      • Steven Tryon
        I use yj . Steve ... -- Steven Tryon stryon@rochester.rr.com ICQ 102798975
        Message 3 of 6 , Jan 1, 2003
        • 0 Attachment
          I use "yj".

          Steve

          On Wed, 2003-01-01 at 09:52, John Culleton wrote:
          > If I type "yy" I yank one line. If I type "1y" I get no lines. If I
          > type "2y" I yank three lines.
          >
          > So how does one yank exactly 2 lines?
          --
          Steven Tryon
          stryon@...
          ICQ 102798975
        • Andreas Schlapbach
          ... 2yy, or am I missing something? :) Andreas -- Andreas Schlapbach schlpbch@iam.unibe.ch http://www.iam.unibe.ch/~schlpbch
          Message 4 of 6 , Jan 1, 2003
          • 0 Attachment
            John Culleton wrote:
            > If I type "yy" I yank one line. If I type "1y" I get no lines. If I
            > type "2y" I yank three lines.
            >
            > So how does one yank exactly 2 lines?

            2yy,

            or am I missing something? :)

            Andreas

            --
            Andreas Schlapbach schlpbch@...
            http://www.iam.unibe.ch/~schlpbch
          • John Culleton
            ... No, I missed something. I never knew yy could have a line count in front of it. Thanks to all who replied. I have been using VI forever but I still have
            Message 5 of 6 , Jan 2, 2003
            • 0 Attachment
              On Wednesday 01 January 2003 23:06, Andreas Schlapbach wrote:
              > John Culleton wrote:
              > > If I type "yy" I yank one line. If I type "1y" I get no lines. If I
              > > type "2y" I yank three lines.
              > >
              > > So how does one yank exactly 2 lines?
              >
              > 2yy,
              >
              > or am I missing something? :)
              >
              > Andreas

              No, I missed something. I never knew "yy" could have a line count in
              front of it. Thanks to all who replied. I have been using VI forever
              but I still have lots to learn about Vim :-)
              --

              John Culleton
              Able Indexers and Typesetters
              Rowse Reviews
              Culleton Editorial Services
              http://wexfordpress.com
            • Ross A. Osborn
              ... I believe all of the commands mentioned in this thread behave exactly the same in vi and vim. Ross
              Message 6 of 6 , Jan 6, 2003
              • 0 Attachment
                On Thu, Jan 02, 2003 at 03:40:42PM +0000, John Culleton wrote:
                > On Wednesday 01 January 2003 23:06, Andreas Schlapbach wrote:
                > > John Culleton wrote:
                > > > If I type "yy" I yank one line. If I type "1y" I get no lines. If I
                > > > type "2y" I yank three lines.
                > > >
                > > > So how does one yank exactly 2 lines?
                > >
                > > 2yy,
                > >
                > > or am I missing something? :)
                > >
                > > Andreas
                >
                > No, I missed something. I never knew "yy" could have a line count in
                > front of it. Thanks to all who replied. I have been using VI forever
                > but I still have lots to learn about Vim :-)

                I believe all of the commands mentioned in this thread behave exactly
                the same in vi and vim.

                Ross
              Your message has been successfully submitted and would be delivered to recipients shortly.