Home Explore Blog CI



neovim

75th chunk of `runtime/doc/options.txt`
f8f79c3d329324a3b8599dcd1a7193228c90e39c8be526d30000000100000fa5
	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

Title: Vim Options: scrollopt, sections, selection
Summary
This section details the remaining Vim options regarding scrolling behavior and selection. It covers 'scrollopt', which customizes the behavior of 'scrollbind' windows, specifically vertical and horizontal binding, and offset handling with the 'jump' option. Then it explains 'sections', defining nroff macros for section separation. Finally, it discusses 'selection', controlling the behavior of selections in Visual and Select modes, including whether selections are inclusive or exclusive and how they handle past-the-line cursor positioning.