interpreted.
This option is mostly reset when splitting a window to edit another
file. This means that ":split | edit file" results in two windows
with scroll-binding, but ":split file" does not.
*'scrolljump'* *'sj'*
'scrolljump' 'sj' number (default 1)
global
Minimal number of lines to scroll when the cursor gets off the
screen (e.g., with "j"). Not used for scroll commands (e.g., CTRL-E,
CTRL-D). Useful if your terminal scrolls very slowly.
When set to a negative number from -1 to -100 this is used as the
percentage of the window height. Thus -50 scrolls half the window
height.
*'scrolloff'* *'so'*
'scrolloff' 'so' number (default 0)
global or local to window |global-local|
Minimal number of screen lines to keep above and below the cursor.
This will make some context visible around where you are working. If
you set it to a very large value (999) the cursor line will always be
in the middle of the window (except at the start or end of the file or
when long lines wrap).
After using the local value, go back the global value with one of
these two: >vim
setlocal scrolloff<
setlocal scrolloff=-1
< For scrolling horizontally see 'sidescrolloff'.
*'scrollopt'* *'sbo'*
'scrollopt' 'sbo' string (default "ver,jump")
global
This is a comma-separated list of words that specifies how
'scrollbind' windows should behave. 'sbo' stands for ScrollBind
Options.
The following words are available:
ver Bind vertical scrolling for 'scrollbind' windows
hor Bind horizontal scrolling for 'scrollbind' windows
jump Applies to the offset between two windows for vertical
scrolling. This offset is the difference in the first
displayed line of the bound windows. When moving
around in a window, another 'scrollbind' window may
reach a position before the start or after the end of
the buffer. The offset is not changed though, when
moving back the 'scrollbind' window will try to scroll
to the desired position when possible.
When now making that window the current one, two
things can be done with the relative offset:
1. When "jump" is not included, the relative offset is
adjusted for the scroll position in the new current
window. When going back to the other window, the
new relative offset will be used.
2. When "jump" is included, the other windows are
scrolled to keep the same relative offset. When
going back to the other window, it still uses the
same relative offset.
Also see |scroll-binding|.
When 'diff' mode is active there always is vertical scroll binding,
even when "ver" isn't there.
*'sections'* *'sect'*
'sections' 'sect' string (default "SHNHH HUnhsh")
global
Specifies the nroff macros that separate sections. These are pairs of
two letters (See |object-motions|). The default makes a section start
at the nroff macros ".SH", ".NH", ".H", ".HU", ".nh" and ".sh".
*'selection'* *'sel'*
'selection' 'sel' string (default "inclusive")
global
This option defines the behavior of the selection. It is only used
in Visual and Select mode.
Possible values:
value past line inclusive ~
old no yes
inclusive yes yes
exclusive yes no
"past line" means that the cursor is allowed to be positioned one
character past the line.
"inclusive" means that the last character of the selection is included
in an operation. For example, when "x" is used to delete the
selection.
When "old" is used and 'virtualedit' allows the cursor to move past
the end of line the line break still isn't included.
When "exclusive" is used, cursor position in visual mode will be
adjusted for inclusive motions |inclusive-motion-selection-exclusive|.
Note:
- When "exclusive" is used and selecting from the end backwards, you
cannot include the last character of a line, when starting in Normal
mode and 'virtualedit' empty.
- when "exclusive" is used with a single character visual