xref: /vim-8.2.3635/runtime/syntax/remind.vim (revision 00a927d6)
1" Vim syntax file
2" Language:	Remind
3" Maintainer:	Davide Alberani <[email protected]>
4" Last Change:	18 Sep 2009
5" Version:	0.5
6" URL:		http://erlug.linux.it/~da/vim/syntax/remind.vim
7"
8" remind is a sophisticated reminder service
9" you can download remind from:
10"   http://www.roaringpenguin.com/penguin/open_source_remind.php
11
12if version < 600
13  syntax clear
14elseif exists("b:current_syntax")
15  finish
16endif
17
18" shut case off.
19syn case ignore
20
21syn keyword remindCommands	REM OMIT SET FSET UNSET
22syn keyword remindExpiry	UNTIL FROM SCANFROM SCAN WARN SCHED
23syn keyword remindTag		PRIORITY TAG
24syn keyword remindTimed		AT DURATION
25syn keyword remindMove		ONCE SKIP BEFORE AFTER
26syn keyword remindSpecial	INCLUDE INC BANNER PUSH-OMIT-CONTEXT PUSH CLEAR-OMIT-CONTEXT CLEAR POP-OMIT-CONTEXT POP COLOR
27syn keyword remindRun		MSG MSF RUN CAL SATISFY SPECIAL PS PSFILE SHADE MOON
28syn keyword remindConditional	IF ELSE ENDIF IFTRIG
29syn keyword remindDebug		DEBUG DUMPVARS DUMP ERRMSG FLUSH PRESERVE
30syn match remindComment		"#.*$"
31syn region remindString		start=+'+ end=+'+ skip=+\\\\\|\\'+ oneline
32syn region remindString		start=+"+ end=+"+ skip=+\\\\\|\\"+ oneline
33syn match remindVar		"\$[_a-zA-Z][_a-zA-Z0-9]*"
34syn match remindSubst		"%[^ ]"
35syn match remindAdvanceNumber	"\(\*\|+\|-\|++\|--\)[0-9]\+"
36" XXX: use different separators for dates and times?
37syn match remindDateSeparators	"[/:@\.-]" contained
38syn match remindTimes		"[0-9]\{1,2}[:\.][0-9]\{1,2}" contains=remindDateSeparators
39" XXX: why not match only valid dates?  Ok, checking for 'Feb the 30' would
40"       be impossible, but at least check for valid months and times.
41syn match remindDates		"'[0-9]\{4}[/-][0-9]\{1,2}[/-][0-9]\{1,2}\(@[0-9]\{1,2}[:\.][0-9]\{1,2}\)\?'" contains=remindDateSeparators
42" This will match trailing whitespaces that seem to break rem2ps.
43" Courtesy of Michael Dunn.
44syn match remindWarning		display excludenl "\S\s\+$"ms=s+1
45
46
47if version >= 508 || !exists("did_remind_syn_inits")
48  if version < 508
49    let did_remind_syn_inits = 1
50    command -nargs=+ HiLink hi link <args>
51  else
52    command -nargs=+ HiLink hi def link <args>
53  endif
54
55  HiLink remindCommands		Function
56  HiLink remindExpiry		Repeat
57  HiLink remindTag		Label
58  HiLink remindTimed		Statement
59  HiLink remindMove		Statement
60  HiLink remindSpecial		Include
61  HiLink remindRun		Function
62  HiLink remindConditional	Conditional
63  HiLink remindComment		Comment
64  HiLink remindTimes		String
65  HiLink remindString		String
66  HiLink remindDebug		Debug
67  HiLink remindVar		Identifier
68  HiLink remindSubst		Constant
69  HiLink remindAdvanceNumber	Number
70  HiLink remindDateSeparators	Comment
71  HiLink remindDates		String
72  HiLink remindWarning		Error
73
74  delcommand HiLink
75endif
76
77let b:current_syntax = "remind"
78
79" vim: ts=8 sw=2
80