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
9 " For version 5.x: Clear all syntax items
10 " For version 6.x: Quit when a syntax file was already loaded
13 elseif exists("b:current_syntax")
17 if !exists("main_syntax")
18 let main_syntax = 'htmlos'
22 so <sfile>:p:h/html.vim
24 runtime! syntax/html.vim
25 unlet b:current_syntax
28 syn cluster htmlPreproc add=htmlosRegion
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
47 syn keyword htmlosType int str dol flt dat grp contained
50 syn keyword htmlosStorageClass locals contained
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
60 syn region htmlosComment start="#" end="/#" contained
63 syn keyword htmlosConditional if then /if to else elif contained
64 syn keyword htmlosConditional and or nand nor xor not contained
66 syn keyword htmlosRepeat while do /while for /for contained
69 syn keyword htmlosKeyword name value step do rowname colname rownum contained
72 syn keyword htmlosLabel case matched /case switch contained
75 syn keyword htmlosStatement break exit return continue contained
78 syn match htmlosIdentifier "\h\w*[\.]*\w*" contained
81 syn match htmlosSpecialIdentifier "[\$@]" contained
84 syn keyword htmlosDefine function overlay contained
87 syn keyword htmlosBoolean true false contained
90 syn region htmlosStringDouble keepend matchgroup=None start=+"+ end=+"+ contained
91 syn region htmlosStringSingle keepend matchgroup=None start=+'+ end=+'+ contained
94 syn match htmlosNumber "-\=\<\d\+\>" contained
97 syn match htmlosFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained
100 syn match htmlosError "ERROR" contained
103 syn match htmlosParent "[({[\]})]" contained
106 syn keyword htmlosTodo TODO Todo todo contained
108 syn cluster htmlosInside contains=htmlosComment,htmlosFunctions,htmlosIdentifier,htmlosSpecialIdentifier,htmlosConditional,htmlosRepeat,htmlosLabel,htmlosStatement,htmlosOperator,htmlosRelation,htmlosStringSingle,htmlosStringDouble,htmlosNumber,htmlosFloat,htmlosError,htmlosKeyword,htmlosType,htmlosBoolean,htmlosParent
110 syn cluster htmlosTop contains=@htmlosInside,htmlosDefine,htmlosError,htmlosStorageClass
112 syn region htmlosRegion keepend matchgroup=Delimiter start="<<" skip=+".\{-}?>.\{-}"\|'.\{-}?>.\{-}'\|/\*.\{-}?>.\{-}\*/+ end=">>" contains=@htmlosTop
113 syn region htmlosRegion keepend matchgroup=Delimiter start="\[\[" skip=+".\{-}?>.\{-}"\|'.\{-}?>.\{-}'\|/\*.\{-}?>.\{-}\*/+ end="\]\]" contains=@htmlosTop
117 if exists("htmlos_minlines")
118 exec "syn sync minlines=" . htmlos_minlines
120 syn sync minlines=100
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")
128 let did_htmlos_syn_inits = 1
129 command -nargs=+ HiLink hi link <args>
131 command -nargs=+ HiLink hi def link <args>
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
160 let b:current_syntax = "htmlos"
162 if main_syntax == 'htmlos'