Highlighting tab errors

Added option `hltaberrors` which helps to spot sloppy whitespace errors
with tabs used instead of spaces or vice versa.

It uses the value of `tabstospaces` option as a criterion whether a
tab or space character is an error or not.
If `tabstospaces` is on, we probably expect that the file should contain
no tab characters, so any tab character is highlighted as an error.
If `tabstospaces` is off, we probably expect that the file uses
indentation with tabs, so space characters in the initial indent part
of lines are highlighted as errors.
This commit is contained in:
Dmitry Maluka
2020-10-20 22:10:41 +02:00
committed by Dmytro Maluka
parent 8368af3cc8
commit 64370b70d6
3 changed files with 22 additions and 0 deletions

View File

@@ -174,6 +174,13 @@ Here are the available options:
default value: `false`
* `hltaberrors`: highlight tabs when spaces are expected, and spaces when tabs
are expected. More precisely: if `tabstospaces` option is on, highlight
all tab characters; if `tabstospaces` is off, highlight space characters
in the initial indent part of the line.
default value: `false`
* `incsearch`: enable incremental search in "Find" prompt (matching as you type).
default value: `true`