aboutsummaryrefslogtreecommitdiff
path: root/config.def.h
diff options
context:
space:
mode:
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h
index 9d491a0..dff70d5 100644
--- a/config.def.h
+++ b/config.def.h
@@ -827,6 +827,11 @@ enum {
COLOR_COMMENT = COLOR_SYNTAX7,
COLOR_IDENTIFIER = COLOR_SYNTAX8,
COLOR_TYPE = COLOR_SYNTAX9,
+ COLOR_WHITESPACE = COLOR_COMMENT,
+ COLOR_SPACES = COLOR_WHITESPACE,
+ COLOR_TABS = COLOR_WHITESPACE,
+ COLOR_EOL = COLOR_WHITESPACE,
+ COLOR_EOF = COLOR_WHITESPACE,
};
static Color colors[] = {
@@ -894,6 +899,12 @@ static Color colors[] = {
&colors[COLOR_PREPROCESSOR], \
}
+#define SYNTAX_SPACES { "\xC2\xB7", &colors[COLOR_SPACES] }
+#define SYNTAX_TABS { "\xE2\x96\xB6", &colors[COLOR_TABS] }
+#define SYNTAX_TABS_FILL { " ", &colors[COLOR_TABS] }
+#define SYNTAX_EOL { "\xE2\x8F\x8E", &colors[COLOR_EOL] }
+#define SYNTAX_EOF { "~", &colors[COLOR_EOF] }
+
/* these rules are applied top to bottom, first match wins. Therefore more 'greedy'
* rules such as for comments should be the first entries.
*
@@ -905,8 +916,16 @@ static Syntax syntaxes[] = {{
.settings = (const char*[]){
"set number",
"set autoindent",
+ "set show spaces=0 tabs=1 newlines=1",
NULL
},
+ .symbols = {
+ SYNTAX_SPACES,
+ SYNTAX_TABS,
+ SYNTAX_TABS_FILL,
+ SYNTAX_EOL,
+ SYNTAX_EOF,
+ },
.rules = {
SYNTAX_MULTILINE_COMMENT,
SYNTAX_SINGLE_LINE_COMMENT,