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

Leaving Cursor Behind When Scrolling

Expand Messages
  • Damon Butler
    I m using the gui version of vim 6.1, and I haven t been able to identity an option that would leave the cursor at the point I last left it at no matter how
    Message 1 of 6 , May 30, 2002
    • 0 Attachment
      I'm using the gui version of vim 6.1, and I haven't been able to identity an
      option that would leave the cursor at the point I last left it at no matter
      how much I scroll (vertically) the buffer window. Right now, whenever I
      scroll the cursor follows along.

      The idea is that I could scroll way down past where I was editing, and then
      when I started typing again, the window would bounce right back to where I
      was last editing because I haven't actually moved the cursor.

      --Damon
    • Dave Roberts
      If you re only interested in going back into insert mode where you left off then use: gi (:help gi) - Dave ... From: Damon Butler
      Message 2 of 6 , May 30, 2002
      • 0 Attachment
        If you're only interested in going back into insert mode where you left off
        then use:
        gi

        (:help gi)

        - Dave

        -----Original Message-----
        From: Damon Butler [mailto:dbutler@...]
        Sent: Thursday, May 30, 2002 2:26 PM
        To: vim@...
        Subject: Leaving Cursor Behind When Scrolling


        I'm using the gui version of vim 6.1, and I haven't been able to identity an
        option that would leave the cursor at the point I last left it at no matter
        how much I scroll (vertically) the buffer window. Right now, whenever I
        scroll the cursor follows along.

        The idea is that I could scroll way down past where I was editing, and then
        when I started typing again, the window would bounce right back to where I
        was last editing because I haven't actually moved the cursor.

        --Damon
      • Alan G Isaac
        ... I actually like this Windows behavior, but expect to hear many veteran Vimmers speak against it. I think that as a matter of logic, scrolling and cursor
        Message 3 of 6 , May 30, 2002
        • 0 Attachment
          On Thu, 30 May 2002 13:25:44 -0500 Damon Butler <dbutler@...> wrote:
          > I'm using the gui version of vim 6.1, and I haven't been able to identity an
          > option that would leave the cursor at the point I last left it at no matter
          > how much I scroll (vertically) the buffer window. Right now, whenever I
          > scroll the cursor follows along.

          > The idea is that I could scroll way down past where I was editing, and then
          > when I started typing again, the window would bounce right back to where I
          > was last editing because I haven't actually moved the cursor.


          I actually like this Windows behavior, but expect to hear
          many veteran Vimmers speak against it.

          I think that as a matter of logic, scrolling and cursor movement
          should be entirely separate, linked only as chosen by the user.
          (I include commands like PgDn in this: whether that moves the
          cursor or just the view should be configurable.)

          However you can have close enough to what you want.
          :h marks
          I hardly miss being able to leave the cursor behind.

          Alan Isaac
        • Damon Butler
          ... This is the behavior I m used to, as well, almost everywhere I edit text (BBEdit, UltraEdit, e-mail programs, text entry fields on a Web page, etc.). I
          Message 4 of 6 , May 31, 2002
          • 0 Attachment
            > I think that as a matter of logic, scrolling and cursor movement
            > should be entirely separate, linked only as chosen by the user.
            > (I include commands like PgDn in this: whether that moves the
            > cursor or just the view should be configurable.)

            This is the behavior I'm used to, as well, almost everywhere I edit text
            (BBEdit, UltraEdit, e-mail programs, text entry fields on a Web page, etc.).
            I find it odd that VIM seems to break this convention. More likely, it was
            just never thought important enough to incorporate when it got a GUI
            interface.

            And thanks for the tips about marks. With a little practice, these will fit
            the bill nicely for me, I think. Still... ;-)

            --Damon
          • Gary Johnson
            ... Vim is Vi-Improved; it basic behavior is that of vi, and that behavior was established long before the GUI convention of leaving the logical cursor
            Message 5 of 6 , May 31, 2002
            • 0 Attachment
              On Fri, May 31, 2002 at 02:10:36PM -0500, Damon Butler wrote:
              > > I think that as a matter of logic, scrolling and cursor movement
              > > should be entirely separate, linked only as chosen by the user.
              > > (I include commands like PgDn in this: whether that moves the
              > > cursor or just the view should be configurable.)
              >
              > This is the behavior I'm used to, as well, almost everywhere I edit text
              > (BBEdit, UltraEdit, e-mail programs, text entry fields on a Web page, etc.).
              > I find it odd that VIM seems to break this convention. More likely, it was
              > just never thought important enough to incorporate when it got a GUI
              > interface.

              Vim is Vi-Improved; it basic behavior is that of vi, and that behavior
              was established long before the GUI convention of leaving the logical
              cursor position unchanged when scrolling. I believe vi's behavior was
              dictated by the behavior of terminals, which always displayed the cursor
              somewhere on the visible screen. It doesn't feel odd to anyone used to
              it. To have vim behave the other would just be ... odd.

              I think it would be difficult to make gvim behave the way you think you
              want without introducing annoying side effects. GUI editor users
              usually move the cursor to absolute positions with the mouse, whereas
              vim users usually move the cursor incrementally with the keyboard. It
              would be annoying to have paged down to where you want to edit, then as
              you move the cursor either not be able to see it or have the display
              jump to the cursor's position in the file.

              I don't think either way is inherently better than the other, but each
              seems better suited to certain styles of editors than the other.

              Gary

              --
              Gary Johnson | Agilent Technologies
              garyjohn@... | Spokane, Washington, USA
            • Alan G Isaac
              ... Vim is so configurable it is hard to know what will appear odd to a given user, and I think the query concerned how to configure this. (Currently
              Message 6 of 6 , May 31, 2002
              • 0 Attachment
                On Fri, 31 May 2002 20:39:32 -0700 Gary Johnson <garyjohn@...> wrote:
                > To have vim behave the other would just be ... odd.

                Vim is so configurable it is hard to know what will appear odd
                to a given user, and I think the query concerned how to configure
                this. (Currently impossible.)

                > I think it would be difficult to make gvim behave the way you think you
                > want without introducing annoying side effects. GUI editor users
                > usually move the cursor to absolute positions with the mouse, whereas
                > vim users usually move the cursor incrementally with the keyboard. It
                > would be annoying to have paged down to where you want to edit, then as
                > you move the cursor either not be able to see it or have the display
                > jump to the cursor's position in the file.

                In principle you ought to be able to choose whether you are moving
                the cursor or just the viewing window when you do something like
                page down.

                Location of the cursor and of the viewing window are logically separate.
                However it is natural that the cursor be visible when moving. Thus it is
                important that the cursor be able to be nicely called into the viewing
                window. With a GUI this can be done with a mouse: click in the
                viewing window. However there should be a keyboard equivalent.
                I do not know one in Windows.

                In any case, I do not think there is any danger of this change in Vim.
                Marks provide too much of the sought functionality. This was true
                even before I learned about gi, which almost completes the picture.

                Cheers,
                Alan
              Your message has been successfully submitted and would be delivered to recipients shortly.