From 8b5f9c82d0be258ef9ec73f55ec3574a11e52b96 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Mon, 6 Jun 2022 16:06:38 +0100 Subject: [PATCH] Handle ISO dates somewhat --- syntax/pr.vim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/syntax/pr.vim b/syntax/pr.vim index ac32895..e26b6c3 100644 --- a/syntax/pr.vim +++ b/syntax/pr.vim @@ -11,7 +11,22 @@ syntax match prName /^.\+\n-\+$/ syntax match prTodo /^\s*TODO:/ syntax match prWork /^\s*WORK:/ syntax match prDone /^\s*DONE:/ + +" ISO date. +syntax match prDate /\<\d\{4}-\d\{2}\>/ syntax match prDate /\<\d\{4}-\d\{2}-\d\{2}\>/ +syntax match prDate /\<\d\{4}-W\d\{3}\>/ +syntax match prDate /\<\d\{4}-W\d\{3}-\d\>/ + +" ISO time. +syntax match prDate /\/ +syntax match prDate /\/ +syntax match prDate /\/ + +" ISO date and time. +syntax match prDate /\<\d\{4}-\d\{2}-\d\{2}T\d\{2}:\d\{2}\>/ +syntax match prDate /\<\d\{4}-\d\{2}-\d\{2}T\d\{2}:\d\{2}[+-]\d\{2}:\d\{2}\>/ +syntax match prDate /\<\d\{4}-\d\{2}-\d\{2}T\d\{2}:\d\{2}Z\>/ hi prName term=bold cterm=bold gui=bold hi prTodo term=bold,underline cterm=bold,underline gui=bold,underline ctermfg=1 guifg=#ff0000