aboutsummaryrefslogtreecommitdiffstats
path: root/syntax
diff options
context:
space:
mode:
authorkatherine <ageha@airen-no-jikken.icu>2019-12-20 22:07:49 -0700
committerkatherine <ageha@airen-no-jikken.icu>2019-12-20 22:07:49 -0700
commiteaaf661ebe3944920f3597d572dbc892d941c61f (patch)
tree75047ffda9859fce5b84d722c1cb59324e8096cd /syntax
downloadevery.vim-eaaf661ebe3944920f3597d572dbc892d941c61f.tar.gz
initial commit
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