htmlos.vim 8.1 KB

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