blob: 530c046bac7f3fe8b0afb561e2fc221fe8a6b471 [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
118command -nargs=+ HiLink hi def link <args>
Bram Moolenaar071d4272004-06-13 20:20:40 +0000119
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200120" The default methods for highlighting. Can be overridden later
121HiLink htmlosSpecialIdentifier Operator
122HiLink htmlosIdentifier Identifier
123HiLink htmlosStorageClass StorageClass
124HiLink htmlosComment Comment
125HiLink htmlosBoolean Boolean
126HiLink htmlosStringSingle String
127HiLink htmlosStringDouble String
128HiLink htmlosNumber Number
129HiLink htmlosFloat Float
130HiLink htmlosFunctions Function
131HiLink htmlosRepeat Repeat
132HiLink htmlosConditional Conditional
133HiLink htmlosLabel Label
134HiLink htmlosStatement Statement
135HiLink htmlosKeyword Statement
136HiLink htmlosType Type
137HiLink htmlosDefine Define
138HiLink htmlosParent Delimiter
139HiLink htmlosError Error
140HiLink htmlosTodo Todo
141HiLink htmlosOperator Operator
142HiLink htmlosRelation Operator
Bram Moolenaar071d4272004-06-13 20:20:40 +0000143
Bram Moolenaar89bcfda2016-08-30 23:26:57 +0200144delcommand HiLink
Bram Moolenaar071d4272004-06-13 20:20:40 +0000145let b:current_syntax = "htmlos"
146
147if main_syntax == 'htmlos'
148 unlet main_syntax
149endif
150
151" vim: ts=8 sw=2