From eaaf661ebe3944920f3597d572dbc892d941c61f Mon Sep 17 00:00:00 2001 From: katherine Date: Fri, 20 Dec 2019 22:07:49 -0700 Subject: initial commit --- syntax/every.vim | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 syntax/every.vim (limited to 'syntax') diff --git a/syntax/every.vim b/syntax/every.vim new file mode 100644 index 0000000..8b4ca4b --- /dev/null +++ b/syntax/every.vim @@ -0,0 +1,46 @@ +" Vim syntax file +" Language: every +" Maintainer: katherine +" URL: https://git.airen-no-jikken.icu/ageha/every.vim + +if exists("b:current_syntax") + finish +endif + +syn iskeyword a-z,. + +let b:current_syntax = "every" + +syn region everyCommentLine start="#" end="$" + +syn match everyInterval '\%([1-9]\d*[ymdHMS]\s*\)\{1,6}' contained + +syn match everyDate '\%([1-9]\d*\|_\)\%(-\%([1-9]\d\|\d\=[1-9]\|_\)\%(-\%([1-9]\d\|\d\=[1-9]\|_\)\%(\s\+\%(\d\=\d\|_\)\%(:\%(\d\=\d\|_\)\%(:\%(\d\=\d\|_\)\)\=\)\=\)\=\)\=\)\=' contained + +syn match everyBool "[tT][rR][uU][eE]\|[fF][aA][lL][sS][eE]\|[yY][eE][sS]\|[nN][oO]\|[oO][nN]\|[oO][fF][fF]" contained + +syn keyword everyCommand .urgent .local nextgroup=everyBool skipwhite +syn keyword everyCommand .stay .warn nextgroup=everyInterval skipwhite + +syn region everyMessage start=","ms=s+1 end="$" contained + +syn keyword everyEveryKeys from to nextgroup=everyDate skipwhite contained +syn keyword everyEveryKeys every nextgroup=everyInterval skipwhite contained +syn region everyEveryLine start="every" end="$" contains=everyEveryKeys,everyMessage + +syn keyword everyOnKeys on nextgroup=everyDate skipwhite contained +syn region everyOnLine start="on" end="$" contains=everyOnKeys,everyMessage + + +hi def link everyCommentLine Comment + +hi def link everyInterval Number +hi def link everyDate Number +hi def link everyBool Boolean + +hi def link everyCommand Define + +hi def link everyMessage String + +hi def link everyEveryKeys Statement +hi def link everyOnKeys Statement -- cgit v1.2.3