7
|
1 " Vim syntax file
|
|
2 " Language: HTML/OS by Aestiva
|
|
3 " Maintainer: Jason Rust <jrust@westmont.edu>
|
|
4 " URL: http://www.rustyparts.com/vim/syntax/htmlos.vim
|
|
5 " Info: http://www.rustyparts.com/scripts.php
|
|
6 " Last Change: 2003 May 11
|
|
7 "
|
|
8
|
|
9 " For version 5.x: Clear all syntax items
|
|
10 " For version 6.x: Quit when a syntax file was already loaded
|
|
11 if version < 600
|
|
12 syntax clear
|
|
13 elseif exists("b:current_syntax")
|
|
14 finish
|
|
15 endif
|
|
16
|
|
17 if !exists("main_syntax")
|
|
18 let main_syntax = 'htmlos'
|
|
19 endif
|
|
20
|
|
21 if version < 600
|
|
22 so <sfile>:p:h/html.vim
|
|
23 else
|
|
24 runtime! syntax/html.vim
|
|
25 unlet b:current_syntax
|
|
26 endif
|
|
27
|
|
28 syn cluster htmlPreproc add=htmlosRegion
|
|
29
|
|
30 syn case ignore
|
|
31
|
|
32 " Function names
|
|
33 syn keyword htmlosFunctions expand sleep getlink version system ascii getascii syslock sysunlock cr lf clean postprep listtorow split listtocol coltolist rowtolist tabletolist contained
|
|
34 syn keyword htmlosFunctions cut \display cutall cutx cutallx length reverse lower upper proper repeat left right middle trim trimleft trimright count countx locate locatex replace replacex replaceall replaceallx paste pasteleft pasteleftx pasteleftall pasteleftallx pasteright pasterightall pasterightallx chopleft chopleftx chopright choprightx format concat contained
|
|
35 syn keyword htmlosFunctions goto exitgoto contained
|
|
36 syn keyword htmlosFunctions layout cols rows row items getitem putitem switchitems gettable delrow delrows delcol delcols append merge fillcol fillrow filltable pastetable getcol getrow fillindexcol insindexcol dups nodups maxtable mintable maxcol mincol maxrow minrow avetable avecol averow mediantable mediancol medianrow producttable productcol productrow sumtable sumcol sumrow sumsqrtable sumsqrcol sumsqrrow reversecols reverserows switchcols switchrows inscols insrows insfillcol sortcol reversesortcol sortcoln reversesortcoln sortrow sortrown reversesortrow reversesortrown getcoleq getcoleqn getcolnoteq getcolany getcolbegin getcolnotany getcolnotbegin getcolge getcolgt getcolle getcollt getcolgen getcolgtn getcollen getcoltn getcolend getcolnotend getrowend getrownotend getcolin getcolnotin getcolinbegin getcolnotinbegin getcolinend getcolnotinend getrowin getrownotin getrowinbegin getrownotinbegin getrowinend getrownotinend contained
|
|
37 syn keyword htmlosFunctions dbcreate dbadd dbedit dbdelete dbsearch dbsearchsort dbget dbgetsort dbstatus dbindex dbimport dbfill dbexport dbsort dbgetrec dbremove dbpurge dbfind dbfindsort dbunique dbcopy dbmove dbkill dbtransfer dbpoke dbsearchx dbgetx contained
|
|
38 syn keyword htmlosFunctions syshtmlosname sysstartname sysfixfile fileinfo filelist fileindex domainname page browser regdomain username usernum getenv httpheader copy file ts row sysls syscp sysmv sysmd sysrd filepush filepushlink dirname contained
|
|
39 syn keyword htmlosFunctions mail to address subject netmail netmailopen netmailclose mailfilelist netweb netwebresults webpush netsockopen netsockread netsockwrite netsockclose contained
|
|
40 syn keyword htmlosFunctions today time systime now yesterday tomorrow getday getmonth getyear getminute getweekday getweeknum getyearday getdate gettime getamorpm gethour addhours addminutes adddays timebetween timetill timefrom datetill datefrom mixedtimebetween mixeddatetill mixedtimetill mixedtimefrom mixeddatefrom nextdaybyweekfromdate nextdaybyweekfromtoday nextdaybymonthfromdate nextdaybymonthfromtoday nextdaybyyearfromdate nextdaybyyearfromtoday offsetdaybyweekfromdate offsetdaybyweekfromtoday offsetdaybymonthfromdate offsetdaybymonthfromtoday contained
|
|
41 syn keyword htmlosFunctions isprivate ispublic isfile isdir isblank iserror iserror iseven isodd istrue isfalse islogical istext istag isnumber isinteger isdate istableeq istableeqx istableeqn isfuture ispast istoday isweekday isweekend issamedate iseq isnoteq isge isle ismod10 isvalidstring contained
|
|
42 syn keyword htmlosFunctions celtof celtokel ftocel ftokel keltocel keltof cmtoin intocm fttom mtoft fttomile miletoft kmtomile miletokm mtoyd ydtom galtoltr ltrtogal ltrtoqt qttoltr gtooz oztog kgtolb lbtokg mttoton tontomt contained
|
|
43 syn keyword htmlosFunctions max min abs sign inverse square sqrt cube roundsig round ceiling roundup floor rounddown roundeven rounddowneven roundupeven roundodd roundupodd rounddownodd random factorial summand fibonacci remainder mod radians degrees cos sin tan cotan secant cosecant acos asin atan exp power power10 ln log10 log sinh cosh tanh contained
|
|
44 syn keyword htmlosFunctions xmldelete xmldeletex xmldeleteattr xmldeleteattrx xmledit xmleditx xmleditvalue xmleditvaluex xmleditattr xmleditattrx xmlinsertbefore xmlinsertbeforex smlinsertafter xmlinsertafterx xmlinsertattr xmlinsertattrx smlget xmlgetx xmlgetvalue xmlgetvaluex xmlgetattrvalue xmlgetattrvaluex xmlgetrec xmlgetrecx xmlgetrecattrvalue xmlgetrecattrvaluex xmlchopleftbefore xmlchopleftbeforex xmlchoprightbefore xmlchoprightbeforex xmlchopleftafter xmlchopleftafterx xmlchoprightafter xmlchoprightafterx xmllocatebefore xmllocatebeforex xmllocateafter xmllocateafterx contained
|
|
45
|
|
46 " Type
|
|
47 syn keyword htmlosType int str dol flt dat grp contained
|
|
48
|
|
49 " StorageClass
|
|
50 syn keyword htmlosStorageClass locals contained
|
|
51
|
|
52 " Operator
|
|
53 syn match htmlosOperator "[-=+/\*!]" contained
|
|
54 syn match htmlosRelation "[~]" contained
|
|
55 syn match htmlosRelation "[=~][&!]" contained
|
|
56 syn match htmlosRelation "[!=<>]=" contained
|
|
57 syn match htmlosRelation "[<>]" contained
|
|
58
|
|
59 " Comment
|
|
60 syn region htmlosComment start="#" end="/#" contained
|
|
61
|
|
62 " Conditional
|
|
63 syn keyword htmlosConditional if then /if to else elif contained
|
|
64 syn keyword htmlosConditional and or nand nor xor not contained
|
|
65 " Repeat
|
|
66 syn keyword htmlosRepeat while do /while for /for contained
|
|
67
|
|
68 " Keyword
|
|
69 syn keyword htmlosKeyword name value step do rowname colname rownum contained
|
|
70
|
|
71 " Repeat
|
|
72 syn keyword htmlosLabel case matched /case switch contained
|
|
73
|
|
74 " Statement
|
|
75 syn keyword htmlosStatement break exit return continue contained
|
|
76
|
|
77 " Identifier
|
|
78 syn match htmlosIdentifier "\h\w*[\.]*\w*" contained
|
|
79
|
|
80 " Special identifier
|
|
81 syn match htmlosSpecialIdentifier "[\$@]" contained
|
|
82
|
|
83 " Define
|
|
84 syn keyword htmlosDefine function overlay contained
|
|
85
|
|
86 " Boolean
|
|
87 syn keyword htmlosBoolean true false contained
|
|
88
|
|
89 " String
|
|
90 syn region htmlosStringDouble keepend matchgroup=None start=+"+ end=+"+ contained
|
|
91 syn region htmlosStringSingle keepend matchgroup=None start=+'+ end=+'+ contained
|
|
92
|
|
93 " Number
|
|
94 syn match htmlosNumber "-\=\<\d\+\>" contained
|
|
95
|
|
96 " Float
|
|
97 syn match htmlosFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained
|
|
98
|
|
99 " Error
|
|
100 syn match htmlosError "ERROR" contained
|
|
101
|
|
102 " Parent
|
|
103 syn match htmlosParent "[({[\]})]" contained
|
|
104
|
|
105 " Todo
|
|
106 syn keyword htmlosTodo TODO Todo todo contained
|
|
107
|
|
108 syn cluster htmlosInside contains=htmlosComment,htmlosFunctions,htmlosIdentifier,htmlosSpecialIdentifier,htmlosConditional,htmlosRepeat,htmlosLabel,htmlosStatement,htmlosOperator,htmlosRelation,htmlosStringSingle,htmlosStringDouble,htmlosNumber,htmlosFloat,htmlosError,htmlosKeyword,htmlosType,htmlosBoolean,htmlosParent
|
|
109
|
|
110 syn cluster htmlosTop contains=@htmlosInside,htmlosDefine,htmlosError,htmlosStorageClass
|
|
111
|
|
112 syn region htmlosRegion keepend matchgroup=Delimiter start="<<" skip=+".\{-}?>.\{-}"\|'.\{-}?>.\{-}'\|/\*.\{-}?>.\{-}\*/+ end=">>" contains=@htmlosTop
|
|
113 syn region htmlosRegion keepend matchgroup=Delimiter start="\[\[" skip=+".\{-}?>.\{-}"\|'.\{-}?>.\{-}'\|/\*.\{-}?>.\{-}\*/+ end="\]\]" contains=@htmlosTop
|
|
114
|
|
115
|
|
116 " sync
|
|
117 if exists("htmlos_minlines")
|
|
118 exec "syn sync minlines=" . htmlos_minlines
|
|
119 else
|
|
120 syn sync minlines=100
|
|
121 endif
|
|
122
|
|
123 " Define the default highlighting.
|
|
124 " For version 5.7 and earlier: only when not done already
|
|
125 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
126 if version >= 508 || !exists("did_htmlos_syn_inits")
|
|
127 if version < 508
|
|
128 let did_htmlos_syn_inits = 1
|
|
129 command -nargs=+ HiLink hi link <args>
|
|
130 else
|
|
131 command -nargs=+ HiLink hi def link <args>
|
|
132 endif
|
|
133
|
|
134 " The default methods for highlighting. Can be overridden later
|
|
135 HiLink htmlosSpecialIdentifier Operator
|
|
136 HiLink htmlosIdentifier Identifier
|
|
137 HiLink htmlosStorageClass StorageClass
|
|
138 HiLink htmlosComment Comment
|
|
139 HiLink htmlosBoolean Boolean
|
|
140 HiLink htmlosStringSingle String
|
|
141 HiLink htmlosStringDouble String
|
|
142 HiLink htmlosNumber Number
|
|
143 HiLink htmlosFloat Float
|
|
144 HiLink htmlosFunctions Function
|
|
145 HiLink htmlosRepeat Repeat
|
|
146 HiLink htmlosConditional Conditional
|
|
147 HiLink htmlosLabel Label
|
|
148 HiLink htmlosStatement Statement
|
|
149 HiLink htmlosKeyword Statement
|
|
150 HiLink htmlosType Type
|
|
151 HiLink htmlosDefine Define
|
|
152 HiLink htmlosParent Delimiter
|
|
153 HiLink htmlosError Error
|
|
154 HiLink htmlosTodo Todo
|
|
155 HiLink htmlosOperator Operator
|
|
156 HiLink htmlosRelation Operator
|
|
157
|
|
158 delcommand HiLink
|
|
159 endif
|
|
160 let b:current_syntax = "htmlos"
|
|
161
|
|
162 if main_syntax == 'htmlos'
|
|
163 unlet main_syntax
|
|
164 endif
|
|
165
|
|
166 " vim: ts=8 sw=2
|