aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--LICENSE24
-rw-r--r--Readme.md7
-rw-r--r--ftdetect/every.vim1
-rw-r--r--ftplugin/every.vim3
-rw-r--r--syntax/every.vim46
5 files changed, 81 insertions, 0 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..cf1ab25
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <http://unlicense.org>
diff --git a/Readme.md b/Readme.md
new file mode 100644
index 0000000..0e06076
--- /dev/null
+++ b/Readme.md
@@ -0,0 +1,7 @@
+every.vim
+=========
+
+this is a vim syntax file for `every`, a cli event calendar, which can be
+installed with [Vundle](https://github.com/VundleVim/Vundle.vim) or similar
+
+`every` can be downloaded here: https://git.airen-no-jikken.icu/ageha/every
diff --git a/ftdetect/every.vim b/ftdetect/every.vim
new file mode 100644
index 0000000..72ca4bf
--- /dev/null
+++ b/ftdetect/every.vim
@@ -0,0 +1 @@
+au BufRead,BufNewFile *.every set filetype=every
diff --git a/ftplugin/every.vim b/ftplugin/every.vim
new file mode 100644
index 0000000..80795bf
--- /dev/null
+++ b/ftplugin/every.vim
@@ -0,0 +1,3 @@
+setlocal comments=:#
+setlocal commentstring=#\ %s
+setlocal suffixesadd=.every
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