vim-patch:d6c9ac9: runtime(doc): clarify the effect of 'smarttab'

closes: vim/vim#17426

d6c9ac97a0

Co-authored-by: Damien Lejay <damien@lejay.be>
This commit is contained in:
zeertzjq
2025-06-05 06:28:16 +08:00
parent 5e4700152b
commit 038fb30ece
5 changed files with 24 additions and 39 deletions

View File

@@ -8182,16 +8182,11 @@ local options = {
abbreviation = 'sta',
defaults = true,
desc = [=[
When on, a <Tab> in front of a line inserts blanks according to
'shiftwidth'. 'tabstop' or 'softtabstop' is used in other places. A
<BS> will delete a 'shiftwidth' worth of space at the start of the
line.
When off, a <Tab> always inserts blanks according to 'tabstop' or
'softtabstop'. 'shiftwidth' is only used for shifting text left or
right |shift-left-right|.
What gets inserted (a <Tab> or spaces) depends on the 'expandtab'
option. Also see |ins-expandtab|. When 'expandtab' is not set, the
number of spaces is minimized by using <Tab>s.
When enabled, the <Tab> key will indent by 'shiftwidth' if the cursor
is in leading whitespace. The <BS> key has the opposite effect.
This behaves as if 'softtabstop' is set to the value of 'shiftwidth'.
Have a look at section |30.5| of the user guide for detailed
explanations on how Vim works with tabs and spaces.
]=],
full_name = 'smarttab',
scope = { 'global' },