'smartindent'.
An indent is automatically inserted:
- After a line ending in "{".
- After a line starting with a keyword from 'cinwords'.
- Before a line starting with "}" (only with the "O" command).
When typing '}' as the first character in a new line, that line is
given the same indent as the matching "{".
When typing '#' as the first character in a new line, the indent for
that line is removed, the '#' is put in the first column. The indent
is restored for the next line. If you don't want this, use this
mapping: ":inoremap # X^H#", where ^H is entered with CTRL-V CTRL-H.
When using the ">>" command, lines starting with '#' are not shifted
right.
*'smarttab'* *'sta'* *'nosmarttab'* *'nosta'*
'smarttab' 'sta' boolean (default on)
global
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.
*'smoothscroll'* *'sms'* *'nosmoothscroll'* *'nosms'*
'smoothscroll' 'sms' boolean (default off)
local to window
Scrolling works with screen lines. When 'wrap' is set and the first
line in the window wraps part of it may not be visible, as if it is
above the window. "<<<" is displayed at the start of the first line,
highlighted with |hl-NonText|.
You may also want to add "lastline" to the 'display' option to show as
much of the last line as possible.
NOTE: partly implemented, doesn't work yet for |gj| and |gk|.
*'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.
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.
The value of 'softtabstop' will be ignored if |'varsofttabstop'| is set
to anything other than an empty string.
*'spell'* *'nospell'*
'spell' boolean (default off)
local to window
When on spell checking will be done. See |spell|.
The languages are specified with 'spelllang'.
*'spellcapcheck'* *'spc'*
'spellcapcheck' 'spc' string (default "[.?!]\_[\])'"\t ]\+")
local to buffer
Pattern to locate the end of a sentence. The following word will be
checked to start with a capital letter. If not then it is highlighted
with SpellCap |hl-SpellCap| (unless the word is also badly spelled).
When this check is not wanted make this option empty.
Only used when 'spell' is set.
Be careful with special characters, see |option-backslash| about
including spaces and backslashes.
To set this option automatically depending on the language, see
|set-spc-auto|.
*'spellfile'* *'spf'*
'spellfile' 'spf' string (default "")
local to buffer
Name of the word list file where words are added for the |zg| and |zw|
commands. It must end in ".{encoding}.add". You need to include the
path, otherwise the file is placed in the current directory.
The path may include characters from 'isfname', ' ', ',', '@' and ':'.
*E765*
It may also be a comma-separated list of names. A count before the
|zg| and |zw| commands can be used to access each. This allows using
a personal word list file and a project word list file.
When a word is added while this option is empty Nvim will use
(and auto-create) `stdpath('data')/site/spell/`. For the file name the