Merge branch 'master' of http://repo.or.cz/r/msysgit into devel
[msysgit/historical-msysgit.git] / share / vim / vim58 / syntax / hb.vim
blobc3683575cc891e937998fdd3d759c9646bdc9022
1 " Vim syntax file
2 " Language:     Hyper Builder
3 " Maintainer:   Alejandro Forero Cuervo
4 " URL:          http://bachue.com/hb/vim/syntax/hb.vim
5 " Last Change:  2001 May 09
7 " For version 5.x: Clear all syntax items
8 " For version 6.x: Quit when a syntax file was already loaded
9 if version < 600
10   syntax clear
11 elseif exists("b:current_syntax")
12   finish
13 endif
15 " Read the HTML syntax to start with
16 "syn include @HTMLStuff <sfile>:p:h/htmlhb.vim
18 "this would be nice but we are supposed not to do it
19 "set mps=<:>
21 "syn region  HBhtmlString contained start=+"+ end=+"+ contains=htmlSpecialChar
22 "syn region  HBhtmlString contained start=+'+ end=+'+ contains=htmlSpecialChar
24 "syn match   htmlValue    contained "=[\t ]*[^'" \t>][^ \t>]*"
26 syn match   htmlSpecialChar "&[^;]*;" contained
28 syn match   HBhtmlTagSk  contained "[A-Za-z]*"
30 syn match   HBhtmlTagS   contained "<\s*\(hb\s*\.\s*\(sec\|min\|hour\|day\|mon\|year\|input\|html\|time\|getcookie\|streql\|url-enc\)\|wall\s*\.\s*\(show\|info\|id\|new\|rm\|count\)\|auth\s*\.\s*\(chk\|add\|find\|user\)\|math\s*\.\s*exp\)\s*\([^.A-Za-z0-9]\|$\)" contains=HBhtmlTagSk transparent
32 syn match   HBhtmlTagN   contained "[A-Za-z0-9\/\-]\+"
34 syn match   HBhtmlTagB   contained "<\s*[A-Za-z0-9\/\-]\+\(\s*\.\s*[A-Za-z0-9\/\-]\+\)*" contains=HBhtmlTagS,HBhtmlTagN
36 syn region  HBhtmlTag contained start=+<+ end=+>+ contains=HBhtmlTagB,HBDirectiveError
38 syn match HBFileName ".*" contained
40 syn match HBDirectiveKeyword    ":\s*\(include\|lib\|set\|out\)\s\+" contained
42 syn match HBDirectiveError      "^:.*$" contained
44 "syn match HBDirectiveBlockEnd "^:\s*$" contained
46 "syn match HBDirectiveOutHead "^:\s*out\s\+\S\+.*" contained contains=HBDirectiveKeyword,HBFileName
48 "syn match HBDirectiveSetHead "^:\s*set\s\+\S\+.*" contained contains=HBDirectiveKeyword,HBFileName
50 syn match HBInvalidLine "^.*$"
52 syn match HBDirectiveInclude "^:\s*include\s\+\S\+.*$" contains=HBFileName,HBDirectiveKeyword
54 syn match HBDirectiveLib "^:\s*lib\s\+\S\+.*$" contains=HBFileName,HBDirectiveKeyword
56 syn region HBText matchgroup=HBDirectiveKeyword start=/^:\(set\|out\)\s*\S\+.*$/ end=/^:\s*$/ contains=HBDirectiveError,htmlSpecialChar,HBhtmlTag keepend
58 "syn match HBLine "^:.*$" contains=HBDirectiveInclude,HBDirectiveLib,HBDirectiveError,HBDirectiveSet,HBDirectiveOut
60 syn match HBComment "^#.*$"
62 " Define the default highlighting.
63 " For version 5.7 and earlier: only when not done already
64 " For version 5.8 and later: only when an item doesn't have highlighting yet
65 if version >= 508 || !exists("did_hb_syntax_inits")
66   if version < 508
67     let did_hb_syntax_inits = 1
68     command -nargs=+ HiLink hi link <args>
69   else
70     command -nargs=+ HiLink hi def link <args>
71   endif
73   HiLink HBhtmlString                    String
74   HiLink HBhtmlTagN                      Function
75   HiLink htmlSpecialChar                 String
77   HiLink HBInvalidLine Error
78   HiLink HBFoobar Comment
79   hi HBFileName guibg=lightgray guifg=black
80   HiLink HBDirectiveError Error
81   HiLink HBDirectiveBlockEnd HBDirectiveKeyword
82   hi HBDirectiveKeyword guibg=lightgray guifg=darkgreen
83   HiLink HBComment Comment
84   HiLink HBhtmlTagSk Statement
86   delcommand HiLink
87 endif
89 syn sync match Normal grouphere NONE "^:\s*$"
90 syn sync match Normal grouphere NONE "^:\s*lib\s\+[^ \t]\+$"
91 syn sync match Normal grouphere NONE "^:\s*include\s\+[^ \t]\+$"
92 "syn sync match Block  grouphere HBDirectiveSet "^#:\s*set\s\+[^ \t]\+"
93 "syn sync match Block  grouphere HBDirectiveOut "^#:\s*out\s\+[^ \t]\+"
95 let b:current_syntax = "hb"
97 " vim: ts=8