1
0
forked from aniani/vim

runtime(doc): improve the wording of 'sts', 'varts' and 'varsts' values

closes: #17522

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Damien Lejay 2025-06-12 21:56:19 +02:00 committed by Christian Brabandt
parent f5e3b5c04f
commit 91af4c4180
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
2 changed files with 45 additions and 38 deletions

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 9.1. Last change: 2025 Jun 11
*options.txt* For Vim version 9.1. Last change: 2025 Jun 12
VIM REFERENCE MANUAL by Bram Moolenaar
@ -2043,7 +2043,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'smartcase' + off no automatic ignore case switch
'smartindent' + off no smart indentation
'smarttab' + off no smart tab size
'softtabstop' + 0 tabs are always 'tabstop' positions
'softtabstop' + 0 no soft tab stops
'startofline' + on goto startofline with some commands
'tagcase' & "followic" 'ignorecase' when searching tags file
'tagrelative' & off tag file names are not relative
@ -7829,21 +7829,24 @@ A jump table for the options with a short description can be found at |Q_op|.
*'softtabstop'* *'sts'*
'softtabstop' 'sts' number (default 0)
local to buffer
Number of spaces that a <Tab> counts for while performing editing
operations, like inserting a <Tab> or using <BS>. It "feels" like
<Tab>s are being inserted, while in fact a mix of spaces and <Tab>s is
used. This is useful to keep the 'ts' setting at its standard value
of 8, while being able to edit like it is set to 'sts'. However,
commands like "x" still work on the actual characters.
When 'sts' is zero, this feature is off.
When 'sts' is negative, the value of 'shiftwidth' is used.
'softtabstop' is set to 0 when the 'paste' option is set and restored
when 'paste' is reset.
See also |ins-expandtab|. When 'expandtab' is not set, the number of
spaces is minimized by using <Tab>s.
The 'L' flag in 'cpoptions' changes how tabs are used when 'list' is
set.
NOTE: This option is set to 0 when 'compatible' is set.
Create soft tab stops, separated by 'softtabstop' number of columns.
In Insert mode, pressing the <Tab> key will move the cursor to the
next soft tab stop, instead of inserting a literal tab. <BS> behaves
similarly in reverse. Vim inserts a minimal mix of tab and space
characters to produce the visual effect.
This setting does not affect the display of existing tab characters.
A value of 0 disables this behaviour. A negative value makes Vim use
'shiftwidth'. If you plan to use 'sts' and 'shiftwidth' with
different values, you might consider setting 'smarttab'.
'softtabstop' is temporarily set to 0 when 'paste' is on and reset
when it is turned off. It is also reset when 'compatible' is set.
The 'L' flag in 'cpoptions' alters tab behavior when 'list' is
enabled. See also |ins-expandtab| ans user manual section |30.5| for
in-depth explanations.
If Vim is compiled with the |+vartabs| feature then the value of
'softtabstop' will be ignored if |'varsofttabstop'| is set to
@ -9287,36 +9290,40 @@ A jump table for the options with a short description can be found at |Q_op|.
local to buffer
{only available when compiled with the |+vartabs|
feature}
A list of the number of spaces that a <Tab> counts for while editing,
such as inserting a <Tab> or using <BS>. It "feels" like variable-
width <Tab>s are being inserted, while in fact a mixture of spaces
and <Tab>s is used. Tab widths are separated with commas, with the
final value applying to all subsequent tabs.
Defines variable-width soft tab stops. The value is a comma-separated
list of widths in columns. Each width defines the number of columns
before the next soft tab stop. The last value repeats indefinitely.
For example, when editing assembly language files where statements
start in the 9th column and comments in the 41st, it may be useful
to use the following: >
:set varsofttabstop=8,32,8
< This will set soft tabstops with 8 and 8 + 32 spaces, and 8 more
for every column thereafter.
< This sets soft tab stops at column 8, then at column 40 (8 + 32), and
every 8 columns thereafter.
Note that the value of |'softtabstop'| will be ignored while
'varsofttabstop' is set.
Note: this setting overrides 'softtabstop'.
See section |30.5| of the user manual for detailed explanations on how
Vim works with tabs and spaces.
*'vartabstop'* *'vts'*
'vartabstop' 'vts' string (default "")
local to buffer
{only available when compiled with the |+vartabs|
feature}
A list of the number of spaces that a <Tab> in the file counts for,
separated by commas. Each value corresponds to one tab, with the
final value applying to all subsequent tabs. For example: >
:set vartabstop=4,20,10,8
< This will make the first tab 4 spaces wide, the second 20 spaces,
the third 10 spaces, and all following tabs 8 spaces.
Defines variable-width tab stops. The value is a comma-separated list
of widths in columns. Each width defines the number of columns
before the next tab stop; the last value repeats indefinitely.
Note that the value of |'tabstop'| will be ignored while 'vartabstop'
is set.
For example: >
:set vartabstop=4,8
< This places the first tab stop 4 columns from the start of the line
and each subsequent tab stop 8 columns apart.
Note: this setting overrides 'tabstop'.
On UNIX, it is recommended to keep the default tabstop value of 8.
Consider setting 'varsofttabstop' instead.
See section |30.5| of the user manual for detailed explanations on how
Vim works with tabs and spaces.
*'verbose'* *'vbs'*
'verbose' 'vbs' number (default 0)

View File

@ -1,4 +1,4 @@
*quickref.txt* For Vim version 9.1. Last change: 2025 Jun 10
*quickref.txt* For Vim version 9.1. Last change: 2025 Jun 12
VIM REFERENCE MANUAL by Bram Moolenaar
@ -920,7 +920,7 @@ Short explanation of each option: *option-list*
'smartindent' 'si' smart autoindenting for C programs
'smarttab' 'sta' <Tab> in leading whitespace indents by 'shiftwidth'
'smoothscroll' 'sms' scroll by screen lines when 'wrap' is set
'softtabstop' 'sts' number of spaces that <Tab> uses while editing
'softtabstop' 'sts' number of columns between two soft tab stops
'spell' enable spell checking
'spellcapcheck' 'spc' pattern to locate end of a sentence
'spellfile' 'spf' files where |zg| and |zw| store words
@ -987,8 +987,8 @@ Short explanation of each option: *option-list*
'undoreload' 'ur' max nr of lines to save for undo on a buffer reload
'updatecount' 'uc' after this many characters flush swap file
'updatetime' 'ut' after this many milliseconds flush swap file
'varsofttabstop' 'vsts' a list of number of spaces when typing <Tab>
'vartabstop' 'vts' a list of number of spaces for <Tab>s
'varsofttabstop' 'vsts' a list of number of columns between soft tab stops
'vartabstop' 'vts' a list of number of columns between tab stops
'verbose' 'vbs' give informative messages
'verbosefile' 'vfile' file to write messages in
'viewdir' 'vdir' directory where to store files with :mkview