From fd1f9ca1bcacc1e995f39782cc64ddfc55ad303a Mon Sep 17 00:00:00 2001 From: MTDL9 <40929090+MTDL9@users.noreply.github.com> Date: Tue, 16 Apr 2019 07:30:30 +0200 Subject: [PATCH] Add matches for common time zones after timestamps, for #3 --- syntax/log.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/syntax/log.vim b/syntax/log.vim index 067fbb7..6d8d135 100644 --- a/syntax/log.vim +++ b/syntax/log.vim @@ -47,7 +47,10 @@ syn match logDate '^20\d\{6}' syn match logDate '\(\(Mon\|Tue\|Wed\|Thu\|Fri\|Sat\|Sun\) \)\?\(Jan\|Feb\|Mar\|Apr\|May\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec\) [0-9 ]\d' " Matches 12:09:38 or 00:03:38.129Z or 01:32:12.102938 +0700 -syn match logTime '\d\{2}:\d\{2}:\d\{2}\(.\d\{2,6}\)\?\(\s\?[-+]\d\{2,4}\|Z\)\?\>' +syn match logTime '\d\{2}:\d\{2}:\d\{2}\(.\d\{2,6}\)\?\(\s\?[-+]\d\{2,4}\|Z\)\?\>' nextgroup=logTimeZone skipwhite + +" Follows logTime, matches UTC or PDT 2019 +syn match logTimeZone '\(UTC\|PDT\|EDT\|GMT\|EST\|KST\)\( \d\{4}\)\?' contained " Entities @@ -102,6 +105,7 @@ hi def link logString String hi def link logDate Identifier hi def link logTime Function +hi def link logTimeZone Identifier hi def link logUrl Underlined hi def link logDomain Label