aboutsummaryrefslogtreecommitdiffstats
path: root/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'syntax')
-rw-r--r--syntax/every.vim46
1 files changed, 46 insertions, 0 deletions
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 <ageha@airen-no-jikken.icu>
+" 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