On 01/13/12 14:27, Ven Tadipatri wrote:
On Thu, Jan 12, 2012 at 2:08 PM, Tim Chase<[email protected]>  wrote:
  :help 'scrolloff'

Does scrolloff work with only jumping forward (ctrl + f) or does it also work
with jumping back? (ctrl+b)

It works with all jumps (searching forwards/backwards, ^F, ^B, ^D, ^U, *, #, etc), aiming merely to keep 'scrolloff' lines of context above and below the cursor.

    And actually I think it's ok having the scrolloff set to 1. I believe it
is the default value that vim ships with, because I've never changed it
and indeed didn't even know there was a scrolloff feature.

Unless your distribution or a plugin has messed with the setting, stock vim defaults to 0.

   I mean, it does make sense that when you move forward a screen, you
want to see some context of where you are right? Or maybe it's just me.

I tend to leave the default most of the time, only setting it temporarily as-needed. Mostly because I use the zt/z<cr>/zb/z-/z./zz family of commands to push a particular line to the top/bottom of the window, and 'scrolloff' interferes with my intentions here.

For horizontal scrolling, there's also the companion 'sidescrolloff' option.

-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

Reply via email to