From 88db7d5e0654d217964ae6c10668e3eeb7c2ecc3 Mon Sep 17 00:00:00 2001 From: Dakota Schneider Date: Mon, 4 Jun 2018 17:17:47 -0700 Subject: [PATCH 1/2] Support more color code formats Support a broader range of typical color control sequences (with optional leading `0`'s). --- ansi.sublime-settings | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/ansi.sublime-settings b/ansi.sublime-settings index 408ba7d..f1faab5 100644 --- a/ansi.sublime-settings +++ b/ansi.sublime-settings @@ -1,34 +1,34 @@ { "ANSI_FG": [ - {"scope": "black", "code": "\\x1b\\[(0;)?30m", "color": "#000000"}, + {"scope": "black", "code": "\\x1b\\[30m", "color": "#000000"}, {"scope": "black_light", "code": "\\x1b\\[1;30m", "color": "#686868"}, - {"scope": "red", "code": "\\x1b\\[(0;)?31m", "color": "#c71e12"}, + {"scope": "red", "code": "\\x1b\\[(0{,2};)?31m", "color": "#c71e12"}, {"scope": "red_light", "code": "\\x1b\\[1;31m", "color": "#ff6f6b"}, - {"scope": "green", "code": "\\x1b\\[(0;)?32m", "color": "#00c120"}, + {"scope": "green", "code": "\\x1b\\[(0{,2};)?32m", "color": "#00c120"}, {"scope": "green_light", "code": "\\x1b\\[1;32m", "color": "#67f86f"}, - {"scope": "yellow", "code": "\\x1b\\[(0;)?33m", "color": "#c7c327"}, + {"scope": "yellow", "code": "\\x1b\\[(0{,2};)?33m", "color": "#c7c327"}, {"scope": "yellow_light", "code": "\\x1b\\[1;33m", "color": "#fffa72"}, - {"scope": "blue", "code": "\\x1b\\[(0;)?34m", "color": "#0a2fc4"}, + {"scope": "blue", "code": "\\x1b\\[(0{,2};)?34m", "color": "#0a2fc4"}, {"scope": "blue_light", "code": "\\x1b\\[1;34m", "color": "#6a76fc"}, - {"scope": "magenta", "code": "\\x1b\\[(0;)?35m", "color": "#c839c5"}, + {"scope": "magenta", "code": "\\x1b\\[(0{,2};)?35m", "color": "#c839c5"}, {"scope": "magenta_light", "code": "\\x1b\\[1;35m", "color": "#ff7cfd"}, - {"scope": "cyan", "code": "\\x1b\\[(0;)?36m", "color": "#01c5c6"}, + {"scope": "cyan", "code": "\\x1b\\[(0{,2};)?36m", "color": "#01c5c6"}, {"scope": "cyan_light", "code": "\\x1b\\[1;36m", "color": "#68fdfe"}, - {"scope": "white", "code": "\\x1b\\[(0;)?(37)?m", "color": "#c7c7c7"}, + {"scope": "white", "code": "\\x1b\\[(0{,2};)?(37)?m", "color": "#c7c7c7"}, {"scope": "white_light", "code": "\\x1b\\[1;37m", "color": "#ffffff"}, - {"scope": "_bold", "code": "\\x1b\\[(0;)?1m", "color": "#ffffff", "font_style": "bold"} + {"scope": "_bold", "code": "\\x1b\\[(0{,2};)?1m", "color": "#ffffff", "font_style": "bold"} ], "ANSI_BG": [ {"scope": "", "code": "(? Date: Tue, 5 Jun 2018 09:20:44 -0700 Subject: [PATCH 2/2] Fix typo Looks like find and replace had some trouble with this line. --- ansi.sublime-settings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansi.sublime-settings b/ansi.sublime-settings index f1faab5..c72fd65 100644 --- a/ansi.sublime-settings +++ b/ansi.sublime-settings @@ -1,6 +1,6 @@ { "ANSI_FG": [ - {"scope": "black", "code": "\\x1b\\[30m", "color": "#000000"}, + {"scope": "black", "code": "\\x1b\\[(0{,2};)?30m", "color": "#000000"}, {"scope": "black_light", "code": "\\x1b\\[1;30m", "color": "#686868"}, {"scope": "red", "code": "\\x1b\\[(0{,2};)?31m", "color": "#c71e12"}, {"scope": "red_light", "code": "\\x1b\\[1;31m", "color": "#ff6f6b"},