Mercurial > vim
diff runtime/doc/options.txt @ 15713:ad8b2c109b22 v8.1.0864
patch 8.1.0864: cannot have a local value for 'scrolloff' and 'sidescrolloff'
commit https://github.com/vim/vim/commit/375e3390078e740d3c83b0c118c50d9a920036c7
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 31 18:26:10 2019 +0100
patch 8.1.0864: cannot have a local value for 'scrolloff' and 'sidescrolloff'
Problem: Cannot have a local value for 'scrolloff' and 'sidescrolloff'.
(Gary Holloway)
Solution: Make 'scrolloff' and 'sidescrolloff' global-local. (mostly by
Aron Widforss, closes #3539)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 31 Jan 2019 18:30:08 +0100 |
parents | 9cd11f6beb70 |
children | a3e2e7948ee4 |
line wrap: on
line diff
--- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -6590,14 +6590,18 @@ A jump table for the options with a shor *'scrolloff'* *'so'* 'scrolloff' 'so' number (default 0, set to 5 in |defaults.vim|) - global + global or local to window |global-local| {not in Vi} 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). - For scrolling horizontally see 'sidescrolloff'. + After using the local value, go back the global value with one of + these two: > + setlocal scrolloff< + setlocal scrolloff=-1 +< For scrolling horizontally see 'sidescrolloff'. NOTE: This option is set to 0 when 'compatible' is set. *'scrollopt'* *'sbo'* @@ -7152,7 +7156,7 @@ A jump table for the options with a shor *'sidescrolloff'* *'siso'* 'sidescrolloff' 'siso' number (default 0) - global + global or local to window |global-local| {not in Vi} The minimal number of screen columns to keep to the left and to the right of the cursor if 'nowrap' is set. Setting this option to a @@ -7162,7 +7166,11 @@ A jump table for the options with a shor to a large value (like 999) has the effect of keeping the cursor horizontally centered in the window, as long as one does not come too close to the beginning of the line. - NOTE: This option is set to 0 when 'compatible' is set. + After using the local value, go back the global value with one of + these two: > + setlocal sidescrolloff< + setlocal sidescrolloff=-1 +< NOTE: This option is set to 0 when 'compatible' is set. Example: Try this together with 'sidescroll' and 'listchars' as in the following example to never allow the cursor to move