codekingpro/portable-devtools
114k
1" Vim syntax file2" Language: Hyper Builder3" Maintainer: Alejandro Forero Cuervo4" URL: http://bachue.com/hb/vim/syntax/hb.vim5" Last Change: 2012 Jan 08 by Thilo Six6 7" quit when a syntax file was already loaded8if exists("b:current_syntax")9 finish10endif11 12let s:cpo_save = &cpo13set cpo&vim14 15" Read the HTML syntax to start with16"syn include @HTMLStuff <sfile>:p:h/htmlhb.vim17 18"this would be nice but we are supposed not to do it19"set mps=<:>20 21"syn region HBhtmlString contained start=+"+ end=+"+ contains=htmlSpecialChar22"syn region HBhtmlString contained start=+'+ end=+'+ contains=htmlSpecialChar23 24"syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"25 26syn match htmlSpecialChar "&[^;]*;" contained27 28syn match HBhtmlTagSk contained "[A-Za-z]*"29 30syn 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 transparent31 32syn match HBhtmlTagN contained "[A-Za-z0-9\/\-]\+"33 34syn match HBhtmlTagB contained "<\s*[A-Za-z0-9\/\-]\+\(\s*\.\s*[A-Za-z0-9\/\-]\+\)*" contains=HBhtmlTagS,HBhtmlTagN35 36syn region HBhtmlTag contained start=+<+ end=+>+ contains=HBhtmlTagB,HBDirectiveError37 38syn match HBFileName ".*" contained39 40syn match HBDirectiveKeyword ":\s*\(include\|lib\|set\|out\)\s\+" contained41 42syn match HBDirectiveError "^:.*$" contained43 44"syn match HBDirectiveBlockEnd "^:\s*$" contained45 46"syn match HBDirectiveOutHead "^:\s*out\s\+\S\+.*" contained contains=HBDirectiveKeyword,HBFileName47 48"syn match HBDirectiveSetHead "^:\s*set\s\+\S\+.*" contained contains=HBDirectiveKeyword,HBFileName49 50syn match HBInvalidLine "^.*$"51 52syn match HBDirectiveInclude "^:\s*include\s\+\S\+.*$" contains=HBFileName,HBDirectiveKeyword53 54syn match HBDirectiveLib "^:\s*lib\s\+\S\+.*$" contains=HBFileName,HBDirectiveKeyword55 56syn region HBText matchgroup=HBDirectiveKeyword start=/^:\(set\|out\)\s*\S\+.*$/ end=/^:\s*$/ contains=HBDirectiveError,htmlSpecialChar,HBhtmlTag keepend57 58"syn match HBLine "^:.*$" contains=HBDirectiveInclude,HBDirectiveLib,HBDirectiveError,HBDirectiveSet,HBDirectiveOut59 60syn match HBComment "^#.*$"61 62" Define the default highlighting.63" Only when an item doesn't have highlighting yet64 65hi def link HBhtmlString String66hi def link HBhtmlTagN Function67hi def link htmlSpecialChar String68 69hi def link HBInvalidLine Error70hi def link HBFoobar Comment71hi HBFileName guibg=lightgray guifg=black72hi def link HBDirectiveError Error73hi def link HBDirectiveBlockEnd HBDirectiveKeyword74hi HBDirectiveKeyword guibg=lightgray guifg=darkgreen75hi def link HBComment Comment76hi def link HBhtmlTagSk Statement77 78 79syn sync match Normal grouphere NONE "^:\s*$"80syn sync match Normal grouphere NONE "^:\s*lib\s\+[^ \t]\+$"81syn sync match Normal grouphere NONE "^:\s*include\s\+[^ \t]\+$"82"syn sync match Block grouphere HBDirectiveSet "^#:\s*set\s\+[^ \t]\+"83"syn sync match Block grouphere HBDirectiveOut "^#:\s*out\s\+[^ \t]\+"84 85let b:current_syntax = "hb"86 87let &cpo = s:cpo_save88unlet s:cpo_save89" vim: ts=890 