1- *options.txt* For Vim version 9.2. Last change: 2026 Apr 14
1+ *options.txt* For Vim version 9.2. Last change: 2026 Apr 17
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -324,12 +324,12 @@ that was last closed are used again. If this buffer has been edited in this
324324window, the values from back then are used. Otherwise the values from the
325325last closed window where the buffer was edited last are used.
326326
327- It's possible to set a local window option specifically for a type of buffer.
328- When you edit another buffer in the same window, you don't want to keep
329- using these local window options. Therefore Vim keeps a global value of the
330- local window options , which is used when editing another buffer. Each window
331- has its own copy of these values. Thus these are local to the window, but
332- global to all buffers in the window. With this you can do: >
327+ ":setlocal" can be used to set a local window option specifically for a type
328+ of buffer. When you edit another buffer in the same window, you don't want to
329+ keep using these local window options. Meanwhile ":set" also sets a global
330+ value of a local window option , which is used when editing another buffer.
331+ Each window has its own copy of these global values, making them local to the
332+ window, but global to all buffers in the window. With this you can do: >
333333 :e one
334334 :set list
335335 :e two
@@ -7577,16 +7577,33 @@ A jump table for the options with a short description can be found at |Q_op|.
75777577 Minimal number of screen lines to keep above and below the cursor.
75787578 This will make some context visible around where you are working. If
75797579 you set it to a very large value (999) the cursor line will always be
7580- in the middle of the window (except at the start or end of the file or
7581- when long lines wrap).
7580+ in the middle of the window (except at the start or end of the file,
7581+ see 'scrolloffpad' , or when long lines wrap).
75827582 After using the local value, go back the global value with one of
75837583 these two: >
75847584 setlocal scrolloff<
75857585 setlocal scrolloff=-1
75867586< For scrolling horizontally see 'sidescrolloff' .
75877587 NOTE: This option is set to 0 when 'compatible' is set.
75887588
7589- *'scrollopt'* *'sbo'*
7589+ *'scrolloffpad'* *'sop'*
7590+ 'scrolloffpad' 'sop' number (default 0)
7591+ global or local to window | global-local |
7592+ When 'scrolloff' and 'scrolloffpad' are greater than zero, allow
7593+ the cursor to remain centered when at the end of the file.
7594+ Normally, 'scrolloff' will not keep the cursor centered at the
7595+ end of the file.
7596+
7597+ A value of 0 disables this feature. Any value above 0 enables it.
7598+ For a window-local value, -1 means to use the global value.
7599+ Values below -1 are invalid.
7600+
7601+ After using the local value, go back the global value with one of
7602+ these two: >
7603+ setlocal scrolloffpad<
7604+ setlocal scrolloffpad=-1
7605+
7606+ < *'scrollopt'* *'sbo'*
75907607'scrollopt' 'sbo' string (default "ver,jump")
75917608 global
75927609 This is a comma-separated list of words that specifies how
@@ -8672,7 +8689,7 @@ A jump table for the options with a short description can be found at |Q_op|.
86728689 *stl-%[FuncName]*
86738690 %[ defines clickable regions in the statusline. When the user clicks
86748691 on a region with the mouse, the specified function is called. The
8675- same syntax can also be used in 'tabline' .
8692+ same syntax can also be used in 'tabline' and 'tabpanel' .
86768693
86778694 %[FuncName] Start of a clickable region. "FuncName" is the name
86788695 of a Vim function to call when the region is clicked.
@@ -8691,16 +8708,16 @@ A jump table for the options with a short description can be found at |Q_op|.
86918708 "mods" Modifier keys: combination of "s" (shift), "c" (ctrl),
86928709 "a" (alt). Empty string if no modifiers.
86938710 "winid" | window-ID | of the window whose statusline was clicked,
8694- or 0 when the click was in 'tabline' .
8695- "area" "statusline" or "tabline ". Indicates which option the
8696- clicked region belongs to. Useful when a single
8697- callback is shared between 'statusline' and 'tabline' .
8711+ or 0 when the click was in 'tabline' or 'tabpanel' .
8712+ "area" "statusline", "tabline", or "tabpanel ". Indicates
8713+ which option the clicked region belongs to.
8714+ "tabnr" (tabpanel only) Tab page number of the clicked label .
86988715
86998716 If the function returns non-zero, the statusline is redrawn.
87008717 Dragging the statusline to resize the window still works even when
8701- click handlers are defined. When used in 'tabline' , clicks in
8702- %[FuncName] regions are dispatched to the callback instead of the
8703- default tab page selection behavior.
8718+ click handlers are defined. When used in 'tabline' or 'tabpanel' ,
8719+ clicks in %[FuncName] regions are dispatched to the callback
8720+ instead of the default tab- selection behavior.
87048721
87058722 Example: >
87068723 func! ClickFile(info)
0 commit comments