2 " Language: GSP - GNU Server Pages (v. 0.86)
3 " Created By: Nathaniel Harward nharward@yahoo.com
4 " Last Changed: 2012 Jan 08 by Thilo Six
6 " URL: http://www.constructicon.com/~nharward/vim/syntax/gsp.vim
8 " For version 5.x: Clear all syntax items
9 " For version 6.x: Quit when a syntax file was already loaded
12 elseif exists("b:current_syntax")
16 if !exists("main_syntax")
17 let main_syntax = 'gsp'
22 source <sfile>:p:h/html.vim
24 runtime! syntax/html.vim
26 unlet b:current_syntax
32 syn include @gspJava <sfile>:p:h/java.vim
34 syn include @gspJava syntax/java.vim
40 " Add <java> as an HTML tag name along with its args
41 syn keyword htmlTagName contained java
42 syn keyword htmlArg contained type file page
44 " Redefine some HTML things to include (and highlight) gspInLine code in
45 " places where it's likely to be found
46 syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,gspInLine
47 syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,gspInLine
48 syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc,gspInLine
49 syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError,gspInLine
50 syn region htmlTag start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,gspInLine
51 syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster,gspInLine
52 syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster,gspInLine
54 " Define the GSP java code blocks
55 syn region gspJavaBlock start="<java\>[^>]*\>" end="</java>"me=e-7 contains=@gspJava,htmlTag
56 syn region gspInLine matchgroup=htmlError start="`" end="`" contains=@gspJava
58 let b:current_syntax = "gsp"
60 if main_syntax == 'gsp'