Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added syntax highlighting for time-duration #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions syntax/log.vim
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ syn match logTime '\d\{2}:\d\{2}:\d\{2}\(\.\d\{2,6}\)\?\(\s\?[-+]\d\{2,4}\|Z\)\?
syn match logTimeZone '[A-Z]\{2,5}\>\( \d\{4}\)\?' contained
syn match logTimeZone '\d\{4} [A-Z]\{2,5}\>' contained

" Matches time durations like 1ms or 1y 2d 23ns
syn match logDuration '\(^\|\s\)\@<=\d\+\s*[mn]\?[ywdhms]\(\s\|$\)\@='

" Entities
"---------------------------------------------------------------------------
Expand Down Expand Up @@ -116,6 +118,7 @@ hi def link logDate Identifier
hi def link logDateDay Identifier
hi def link logTime Function
hi def link logTimeZone Identifier
hi def link logDuration Identifier

hi def link logUrl Underlined
hi def link logDomain Label
Expand Down