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

Re: noscrollbind ignored (kind of)

Expand Messages
  • Ben Fritz
    ... Yes, we re pretty sure this is the cause. ... Scrollbind affects window position. Cursorbind affects cursor position. With scrollbind set, you can scroll
    Message 1 of 7 , Feb 27 12:05 PM
    • 0 Attachment
      On Wednesday, February 27, 2013 2:04:03 AM UTC-6, Christian Brabandt wrote:
      >
      > I think, what you are seeing is the effect of 'cursorbind', which
      >
      > get's set by diff-mode and is still set in all windows.
      >
      >

      Yes, we're pretty sure this is the cause.

      >
      > I am currently puzzled, what cursorbind does, that scrollbind doesn't
      >
      > provide e.g. why we need both options and I don't understand it in
      >
      > the manual.
      >
      >

      Scrollbind affects window position. Cursorbind affects cursor position. With scrollbind set, you can scroll both windows in a diff view together. With cursorbind, if you then switch windows, the cursor does not move vertically when it reaches the new window. In other words, either of these will do the same thing in a 2-window setup:

      do
      <C-W><C-W>dp

      Without cursorbind, when you jump to the other window, the cursor remains wherever it was the last time the cursor was in that window. Or, if the window has scrolled far enough, the cursor will be at the top/bottom of the window, even if the cursor was in the middle of the other window when you left it.

      >
      > So yes, using :diffoff! is easier to stop diff mode.
      >

      Much easier. But it also messes with other settings like 'wrap' and 'foldmethod', so I like to do this to start diffmode instead:

      :tab split
      :diffsplit other_file

      And this to end it:

      :tabclose

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