blob: b54ca7a92157670e60edd79efd53b8fb56d9fbbd [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" 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
Bram Moolenaar89bcfda2016-08-30 23:26:57 +02009" quit when a syntax file was already loaded
10if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +000011 finish
12endif
13
14if !exists("main_syntax")
15 let main_syntax = 'htmlos'
16endif
17
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020018runtime! syntax/html.vim
19unlet b:current_syntax
Bram Moolenaar071d4272004-06-13 20:20:40 +000020
21syn cluster htmlPreproc add=htmlosRegion
22
23syn case ignore
24
25" Function names
26syn keyword htmlosFunctions expand sleep getlink version system ascii getascii syslock sysunlock cr lf clean postprep listtorow split listtocol coltolist rowtolist tabletolist contained
27syn 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
28syn keyword htmlosFunctions goto exitgoto contained
29syn 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
30syn 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
31syn 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
32syn keyword htmlosFunctions mail to address subject netmail netmailopen netmailclose mailfilelist netweb netwebresults webpush netsockopen netsockread netsockwrite netsockclose contained
33syn 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
34syn 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
35syn 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
36syn 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
37syn 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
38
39" Type
40syn keyword htmlosType int str dol flt dat grp contained
41
42" StorageClass
43syn keyword htmlosStorageClass locals contained
44
45" Operator
46syn match htmlosOperator "[-=+/\*!]" contained
47syn match htmlosRelation "[~]" contained
48syn match htmlosRelation "[=~][&!]" contained
49syn match htmlosRelation "[!=<>]=" contained
50syn match htmlosRelation "[<>]" contained
51
52" Comment
53syn region htmlosComment start="#" end="/#" contained
54
55" Conditional
56syn keyword htmlosConditional if then /if to else elif contained
57syn keyword htmlosConditional and or nand nor xor not contained
58" Repeat
59syn keyword htmlosRepeat while do /while for /for contained
60
61" Keyword
62syn keyword htmlosKeyword name value step do rowname colname rownum contained
63
64" Repeat
65syn keyword htmlosLabel case matched /case switch contained
66
67" Statement
68syn keyword htmlosStatement break exit return continue contained
69
70" Identifier
71syn match htmlosIdentifier "\h\w*[\.]*\w*" contained
72
73" Special identifier
74syn match htmlosSpecialIdentifier "[\$@]" contained
75
76" Define
77syn keyword htmlosDefine function overlay contained
78
79" Boolean
80syn keyword htmlosBoolean true false contained
81
82" String
83syn region htmlosStringDouble keepend matchgroup=None start=+"+ end=+"+ contained
84syn region htmlosStringSingle keepend matchgroup=None start=+'+ end=+'+ contained
85
86" Number
87syn match htmlosNumber "-\=\<\d\+\>" contained
88
89" Float
90syn match htmlosFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained
91
92" Error
93syn match htmlosError "ERROR" contained
94
95" Parent
96syn match htmlosParent "[({[\]})]" contained
97
98" Todo
99syn keyword htmlosTodo TODO Todo todo contained
100
101syn cluster htmlosInside contains=htmlosComment,htmlosFunctions,htmlosIdentifier,htmlosSpecialIdentifier,htmlosConditional,htmlosRepeat,htmlosLabel,htmlosStatement,htmlosOperator,htmlosRelation,htmlosStringSingle,htmlosStringDouble,htmlosNumber,htmlosFloat,htmlosError,htmlosKeyword,htmlosType,htmlosBoolean,htmlosParent
102
103syn cluster htmlosTop contains=@htmlosInside,htmlosDefine,htmlosError,htmlosStorageClass
104
105syn region htmlosRegion keepend matchgroup=Delimiter start="<<" skip=+".\{-}?>.\{-}"\|'.\{-}?>.\{-}'\|/\*.\{-}?>.\{-}\*/+ end=">>" contains=@htmlosTop
106syn region htmlosRegion keepend matchgroup=Delimiter start="\[\[" skip=+".\{-}?>.\{-}"\|'.\{-}?>.\{-}'\|/\*.\{-}?>.\{-}\*/+ end="\]\]" contains=@htmlosTop
107
108
109" sync
110if exists("htmlos_minlines")
111 exec "syn sync minlines=" . htmlos_minlines
112else
113 syn sync minlines=100
114endif
115
116" Define the default highlighting.
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200117" Only when an item doesn't have highlighting yet
Bram Moolenaar071d4272004-06-13 20:20:40 +0000118
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200119" The default methods for highlighting. Can be overridden later
Bram Moolenaarf37506f2016-08-31 22:22:10 +0200120hi def link htmlosSpecialIdentifier Operator
121hi def link htmlosIdentifier Identifier
122hi def link htmlosStorageClass StorageClass
123hi def link htmlosComment Comment
124hi def link htmlosBoolean Boolean
125hi def link htmlosStringSingle String
126hi def link htmlosStringDouble String
127hi def link htmlosNumber Number
128hi def link htmlosFloat Float
129hi def link htmlosFunctions Function
130hi def link htmlosRepeat Repeat
131hi def link htmlosConditional Conditional
132hi def link htmlosLabel Label
133hi def link htmlosStatement Statement
134hi def link htmlosKeyword Statement
135hi def link htmlosType Type
136hi def link htmlosDefine Define
137hi def link htmlosParent Delimiter
138hi def link htmlosError Error
139hi def link htmlosTodo Todo
140hi def link htmlosOperator Operator
141hi def link htmlosRelation Operator
Bram Moolenaar071d4272004-06-13 20:20:40 +0000142
Bram Moolenaar071d4272004-06-13 20:20:40 +0000143let b:current_syntax = "htmlos"
144
145if main_syntax == 'htmlos'
146 unlet main_syntax
147endif
148
149" vim: ts=8 sw=2