vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit ab49fb683ed6c1ab73e93071a0c952d94c87437d parent bbaf180c94b72e65aae4bbec04cd24c9b7057a45 Author: Marc André Tanner <mat@brain-dump.org> Date: Tue, 30 Sep 2014 22:22:44 +0200 Improve some syntax highlighting rules Diffstat:
| M | config.def.h | | | 8 | ++++---- |
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/config.def.h b/config.def.h @@ -882,9 +882,9 @@ static Color colors[] = { &colors[COLOR_COMMENT], \ } -#define SYNTAX_LITERAL { \ - "('(\\\\.|.)')|(0x[0-9A-Fa-f]+|[0-9]+)", \ - &colors[COLOR_LITERAL], \ +#define SYNTAX_LITERAL { \ + "('(\\\\.|.)')|"B"(0x[0-9A-Fa-f]+|[0-9]+)"B, \ + &colors[COLOR_LITERAL], \ } #define SYNTAX_STRING { \ @@ -919,7 +919,7 @@ static Syntax syntaxes[] = {{ SYNTAX_CONSTANT, SYNTAX_BRACKET, { - "<[a-zA-Z0-9\\.-_]+>", + "<[a-zA-Z0-9\\.\\-_/]+\\.(c(pp|xx)?|h(pp|xx)?|cc)>", &colors[COLOR_STRING], },{ "(^#[\\t ]*(define|include(_next)?|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma))",