summaryrefslogtreecommitdiff
path: root/runtime/syntax/remind.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/syntax/remind.vim')
-rw-r--r--runtime/syntax/remind.vim26
1 files changed, 18 insertions, 8 deletions
diff --git a/runtime/syntax/remind.vim b/runtime/syntax/remind.vim
index 001868e15..93a717847 100644
--- a/runtime/syntax/remind.vim
+++ b/runtime/syntax/remind.vim
@@ -1,12 +1,13 @@
" Vim syntax file
" Language: Remind
" Maintainer: Davide Alberani <alberanid@libero.it>
-" Last Change: 10 May 2006
-" Version: 0.3
+" Last Change: 18 Sep 2009
+" Version: 0.5
" URL: http://erlug.linux.it/~da/vim/syntax/remind.vim
"
-" remind is a sophisticated reminder service; you can download remind from:
-" http://www.roaringpenguin.com/penguin/open_source_remind.php
+" remind is a sophisticated reminder service
+" you can download remind from:
+" http://www.roaringpenguin.com/penguin/open_source_remind.php
if version < 600
syntax clear
@@ -14,24 +15,30 @@ elseif exists("b:current_syntax")
finish
endif
-" shut case off
+" shut case off.
syn case ignore
syn keyword remindCommands REM OMIT SET FSET UNSET
-syn keyword remindExpiry UNTIL SCANFROM SCAN WARN SCHED
+syn keyword remindExpiry UNTIL FROM SCANFROM SCAN WARN SCHED
syn keyword remindTag PRIORITY TAG
syn keyword remindTimed AT DURATION
syn keyword remindMove ONCE SKIP BEFORE AFTER
-syn keyword remindSpecial INCLUDE INC BANNER PUSH-OMIT-CONTEXT PUSH CLEAR-OMIT-CONTEXT CLEAR POP-OMIT-CONTEXT POP
+syn keyword remindSpecial INCLUDE INC BANNER PUSH-OMIT-CONTEXT PUSH CLEAR-OMIT-CONTEXT CLEAR POP-OMIT-CONTEXT POP COLOR
syn keyword remindRun MSG MSF RUN CAL SATISFY SPECIAL PS PSFILE SHADE MOON
syn keyword remindConditional IF ELSE ENDIF IFTRIG
+syn keyword remindDebug DEBUG DUMPVARS DUMP ERRMSG FLUSH PRESERVE
syn match remindComment "#.*$"
syn region remindString start=+'+ end=+'+ skip=+\\\\\|\\'+ oneline
syn region remindString start=+"+ end=+"+ skip=+\\\\\|\\"+ oneline
-syn keyword remindDebug DEBUG DUMPVARS DUMP ERRMSG FLUSH PRESERVE
syn match remindVar "\$[_a-zA-Z][_a-zA-Z0-9]*"
syn match remindSubst "%[^ ]"
syn match remindAdvanceNumber "\(\*\|+\|-\|++\|--\)[0-9]\+"
+" XXX: use different separators for dates and times?
+syn match remindDateSeparators "[/:@\.-]" contained
+syn match remindTimes "[0-9]\{1,2}[:\.][0-9]\{1,2}" contains=remindDateSeparators
+" XXX: why not match only valid dates? Ok, checking for 'Feb the 30' would
+" be impossible, but at least check for valid months and times.
+syn match remindDates "'[0-9]\{4}[/-][0-9]\{1,2}[/-][0-9]\{1,2}\(@[0-9]\{1,2}[:\.][0-9]\{1,2}\)\?'" contains=remindDateSeparators
" This will match trailing whitespaces that seem to break rem2ps.
" Courtesy of Michael Dunn.
syn match remindWarning display excludenl "\S\s\+$"ms=s+1
@@ -54,11 +61,14 @@ if version >= 508 || !exists("did_remind_syn_inits")
HiLink remindRun Function
HiLink remindConditional Conditional
HiLink remindComment Comment
+ HiLink remindTimes String
HiLink remindString String
HiLink remindDebug Debug
HiLink remindVar Identifier
HiLink remindSubst Constant
HiLink remindAdvanceNumber Number
+ HiLink remindDateSeparators Comment
+ HiLink remindDates String
HiLink remindWarning Error
delcommand HiLink