annotate runtime/syntax/calendar.vim @ 369:c53c2d4cda26

updated for version 7.0095
author vimboss
date Mon, 27 Jun 2005 22:37:13 +0000
parents 3fc0f57ecb91
children f14cbd913415
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: calendar(1) file.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Nikolai Weibull <source@pcppopper.org>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " URL: http://www.pcppopper.org/vim/syntax/pcp/calendar/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Latest Revision: 2004-05-06
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " arch-tag: d714127d-469d-43bd-9c79-c2a46ec54535
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn keyword calendarTodo contained TODO FIXME XXX NOTE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn region calendarComment matchgroup=calendarComment start='/\*' end='\*/' contains=calendarTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " Strings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn region calendarCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=calendarSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match calendarSpecial display contained '\\\%(x\x\+\|\o\{1,3}\|.\|$\)'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match calendarSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " cpp(1) Preprocessor directives (adapted from syntax/c.vim)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn region calendarPreCondit start='^\s*#\s*\%(if\|ifdef\|ifndef\|elif\)\>' skip='\\$' end='$' contains=calendarComment,calendarCppString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match calendarPreCondit display '^\s*#\s*\%(else\|endif\)\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn region calendarCppOut start='^\s*#\s*if\s\+0\+' end='.\@=\|$' contains=calendarCppOut2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn region calendarCppOut2 contained start='0' end='^\s*#\s*\%(endif\|else\|elif\)\>' contains=calendarSpaceError,calendarCppSkip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn region calendarCppSkip contained start='^\s*#\s*\%(if\|ifdef\|ifndef\)\>' skip='\\$' end='^\s*#\s*endif\>' contains=calendarSpaceError,calendarCppSkip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn region calendarIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match calendarIncluded display contained '<[^>]*>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match calendarInclude display '^\s*#\s*include\>\s*["<]' contains=calendarIncluded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn cluster calendarPreProcGroup contains=calendarPreCondit,calendarIncluded,calendarInclude,calendarDefine,calendarCppOut,calendarCppOut2,calendarCppSkip,calendarString,calendarSpecial,calendarTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn region calendarDefine start='^\s*#\s*\%(define\|undef\)\>' skip='\\$' end='$' contains=ALLBUT,@calendarPreProcGroup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn region calendarPreProc start='^\s*#\s*\%(pragma\|line\|warning\|warn\|error\)\>' skip='\\$' end='$' keepend contains=ALLBUT,@calendarPreProcGroup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " Keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn keyword calendarKeyword CHARSET BODUN LANG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword calendarKeyword Easter Pashka
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " Dates
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match calendarNumber '\<\d\+\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn keyword calendarMonth Jan[uary] Feb[ruary] Mar[ch] Apr[il] May Jun[e]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword calendarMonth Jul[y] Aug[ust] Sep[tember] Oct[ober]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword calendarMonth Nov[ember] Dec[ember]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match calendarMonth '\<\%(Jan\|Feb\|Mar\|Apr\|May\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec\)\.'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword calendarWeekday Mon[day] Tue[sday] Wed[nesday] Thu[rsday]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword calendarWeekday Fri[day] Sat[urday] Sun[day]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn match calendarWeekday '\<\%(Mon\|Tue\|Wed\|Thu\|Fri\|Sat\|Sun\)\.' nextgroup=calendarWeekdayMod
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match calendarWeekdayMod '[+-]\d\+\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 " Times
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn match calendarTime '\<\%([01]\=\d\|2[0-3]\):[0-5]\d\%(:[0-5]\d\)\='
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match calendarTime '\<\%(0\=[1-9]\|1[0-2]\):[0-5]\d\%(:[0-5]\d\)\=\s*[AaPp][Mm]'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 " Variables
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match calendarVariable '\*'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 let b:c_minlines = 50 " #if 0 constructs can be long
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 exec "syn sync ccomment calendarComment minlines=" . b:c_minlines
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 if version >= 508 || !exists("did_calendar_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 let did_calendar_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 HiLink calendarTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 HiLink calendarComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 HiLink calendarCppString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 HiLink calendarSpecial SpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 HiLink calendarPreCondit PreCondit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 HiLink calendarCppOut Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 HiLink calendarCppOut2 calendarCppOut
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 HiLink calendarCppSkip calendarCppOut
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 HiLink calendarIncluded String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 HiLink calendarInclude Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 HiLink calendarDefine Macro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 HiLink calendarPreProc PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 HiLink calendarKeyword Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 HiLink calendarNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 HiLink calendarMonth String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 HiLink calendarWeekday String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 HiLink calendarWeekdayMod Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 HiLink calendarTime Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 HiLink calendarVariable Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 let b:current_syntax = "calendar"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 " vim: set sts=2 sw=2: