Skip to content

Commit 72dfa71

Browse files
committed
Extend logTime to nanosecond precision
1 parent 1037e26 commit 72dfa71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

syntax/log.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ syn match logDate '^20\d\{6}'
4747
syn keyword logDate Mon Tue Wed Thu Fri Sat Sun Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec nextgroup=logDateDay
4848
syn match logDateDay '\s\{1,2}\d\{1,2}' contained
4949

50-
" Matches 12:09:38 or 00:03:38.129Z or 01:32:12.102938 +0700
51-
syn match logTime '\d\{2}:\d\{2}:\d\{2}\(\.\d\{2,6}\)\?\(\s\?[-+]\d\{2,4}\|Z\)\?\>' nextgroup=logTimeZone,logSysColumns skipwhite
50+
" Matches 12:09:38 or 00:03:38.129Z or 01:32:12.102938 +0700 or 01:32:12.123456789
51+
syn match logTime '\d\{2}:\d\{2}:\d\{2}\(\.\d\{2,9}\)\?\(\s\?[-+]\d\{2,4}\|Z\)\?\>' nextgroup=logTimeZone,logSysColumns skipwhite
5252

5353
" Follows logTime, matches UTC or PDT 2019 or 2019 EDT
5454
syn match logTimeZone '[A-Z]\{2,5}\>\( \d\{4}\)\?' contained

0 commit comments

Comments
 (0)