annotate runtime/syntax/hb.vim @ 1761:0836531167ab v7.2.059

updated for version 7.2-059
author vimboss
date Sun, 30 Nov 2008 14:16:57 +0000
parents 3fc0f57ecb91
children ba708ee8d69d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Hyper Builder
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Alejandro Forero Cuervo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " URL: http://bachue.com/hb/vim/syntax/hb.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Last Change: 2001 Sep 02
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " Read the HTML syntax to start with
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 "syn include @HTMLStuff <sfile>:p:h/htmlhb.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 "this would be nice but we are supposed not to do it
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 "set mps=<:>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 "syn region HBhtmlString contained start=+"+ end=+"+ contains=htmlSpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 "syn region HBhtmlString contained start=+'+ end=+'+ contains=htmlSpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 "syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match htmlSpecialChar "&[^;]*;" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match HBhtmlTagSk contained "[A-Za-z]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match HBhtmlTagN contained "[A-Za-z0-9\/\-]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match HBhtmlTagB contained "<\s*[A-Za-z0-9\/\-]\+\(\s*\.\s*[A-Za-z0-9\/\-]\+\)*" contains=HBhtmlTagS,HBhtmlTagN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn region HBhtmlTag contained start=+<+ end=+>+ contains=HBhtmlTagB,HBDirectiveError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match HBFileName ".*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match HBDirectiveKeyword ":\s*\(include\|lib\|set\|out\)\s\+" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match HBDirectiveError "^:.*$" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 "syn match HBDirectiveBlockEnd "^:\s*$" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 "syn match HBDirectiveOutHead "^:\s*out\s\+\S\+.*" contained contains=HBDirectiveKeyword,HBFileName
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 "syn match HBDirectiveSetHead "^:\s*set\s\+\S\+.*" contained contains=HBDirectiveKeyword,HBFileName
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn match HBInvalidLine "^.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match HBDirectiveInclude "^:\s*include\s\+\S\+.*$" contains=HBFileName,HBDirectiveKeyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn match HBDirectiveLib "^:\s*lib\s\+\S\+.*$" contains=HBFileName,HBDirectiveKeyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn region HBText matchgroup=HBDirectiveKeyword start=/^:\(set\|out\)\s*\S\+.*$/ end=/^:\s*$/ contains=HBDirectiveError,htmlSpecialChar,HBhtmlTag keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 "syn match HBLine "^:.*$" contains=HBDirectiveInclude,HBDirectiveLib,HBDirectiveError,HBDirectiveSet,HBDirectiveOut
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match HBComment "^#.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 if version >= 508 || !exists("did_hb_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 let did_hb_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 HiLink HBhtmlString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 HiLink HBhtmlTagN Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 HiLink htmlSpecialChar String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 HiLink HBInvalidLine Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 HiLink HBFoobar Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 hi HBFileName guibg=lightgray guifg=black
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 HiLink HBDirectiveError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 HiLink HBDirectiveBlockEnd HBDirectiveKeyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 hi HBDirectiveKeyword guibg=lightgray guifg=darkgreen
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 HiLink HBComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 HiLink HBhtmlTagSk Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn sync match Normal grouphere NONE "^:\s*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn sync match Normal grouphere NONE "^:\s*lib\s\+[^ \t]\+$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn sync match Normal grouphere NONE "^:\s*include\s\+[^ \t]\+$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 "syn sync match Block grouphere HBDirectiveSet "^#:\s*set\s\+[^ \t]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 "syn sync match Block grouphere HBDirectiveOut "^#:\s*out\s\+[^ \t]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 let b:current_syntax = "hb"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 " vim: ts=8