From e6ac037ec686a18f6adeab89b5decd45f2a4ed0f Mon Sep 17 00:00:00 2001 From: Jesse Portnoy Date: Wed, 1 Nov 2023 12:18:12 +0000 Subject: [PATCH] lexer for history --- syntax_files/history.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 syntax_files/history.yaml diff --git a/syntax_files/history.yaml b/syntax_files/history.yaml new file mode 100644 index 0000000..b8c99f0 --- /dev/null +++ b/syntax_files/history.yaml @@ -0,0 +1,10 @@ +filetype: history + +detect: + filename: "(\\.history)" + +rules: + - constant.number: "^\\s+\\d+\\s" +# export HISTTIMEFORMAT="%F %T: " to get the best highlighting + - preproc: "([0-9]{4}\\-[0-9]{2}\\-[0-9]{2}\\s[0-9]{2}:[0-9]{2}:[0-9]{2})" + - type: ":\\s.*$"