From 268167c81e8d09145489a7f178ea18958b5728f3 Mon Sep 17 00:00:00 2001 From: Christian Nicolai Date: Sat, 6 Aug 2011 12:44:51 +0200 Subject: [PATCH] New bad tab highlighter for YAML files This marks bad tabulators (inverse red) to make clear that YAML only relies on spaces for indentation. --- yaml.jsf | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/yaml.jsf b/yaml.jsf index 1852782..6edd662 100644 --- a/yaml.jsf +++ b/yaml.jsf @@ -14,8 +14,16 @@ =LocalType fg_310 # brown =BlockDelim bold blue +=BadTab inverse red + +:line_start Idle + * idle noeat + "\t" bad_tab recolor=-1 + " " line_start + :idle Idle * idle + "\n" line_start "%" directive recolor=-1 "#" line_comment recolor=-1 "'" string_sq_1 recolor=-1 @@ -26,16 +34,20 @@ "*&" maybe_reference "!" maybe_typecast +# mark bad tabs until the first non-whitespace +:bad_tab BadTab + * line_start noeat + :line_comment Comment * line_comment - "\n" idle + "\n" line_start :brace Brace * idle noeat :directive Directive * directive - "\n" idle + "\n" line_start :string_sq_1 Constant * string_sq noeat