New bad tab highlighter for YAML files

This marks bad tabulators (inverse red) to make clear that YAML
only relies on spaces for indentation.
This commit is contained in:
Christian Nicolai 2011-08-06 12:44:51 +02:00
parent 0ca5a95d56
commit 268167c81e
1 changed files with 14 additions and 2 deletions

View File

@ -14,8 +14,16 @@
=LocalType fg_310 # brown =LocalType fg_310 # brown
=BlockDelim bold blue =BlockDelim bold blue
=BadTab inverse red
:line_start Idle
* idle noeat
"\t" bad_tab recolor=-1
" " line_start
:idle Idle :idle Idle
* idle * idle
"\n" line_start
"%" directive recolor=-1 "%" directive recolor=-1
"#" line_comment recolor=-1 "#" line_comment recolor=-1
"'" string_sq_1 recolor=-1 "'" string_sq_1 recolor=-1
@ -26,16 +34,20 @@
"*&" maybe_reference "*&" maybe_reference
"!" maybe_typecast "!" maybe_typecast
# mark bad tabs until the first non-whitespace
:bad_tab BadTab
* line_start noeat
:line_comment Comment :line_comment Comment
* line_comment * line_comment
"\n" idle "\n" line_start
:brace Brace :brace Brace
* idle noeat * idle noeat
:directive Directive :directive Directive
* directive * directive
"\n" idle "\n" line_start
:string_sq_1 Constant :string_sq_1 Constant
* string_sq noeat * string_sq noeat