2 " Language: GSP - GNU Server Pages (v. 0.86)
3 " Created By: Nathaniel Harward nharward@yahoo.com
4 " Last Changed: Dec. 12, 2000
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
37 " Add <java> as an HTML tag name along with its args
38 syn keyword htmlTagName contained java
39 syn keyword htmlArg contained type file page
41 " Redefine some HTML things to include (and highlight) gspInLine code in
42 " places where it's likely to be found
43 syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,gspInLine
44 syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,gspInLine
45 syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc,gspInLine
46 syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError,gspInLine
47 syn region htmlTag start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,gspInLine
48 syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster,gspInLine
49 syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster,gspInLine
51 " Define the GSP java code blocks
52 syn region gspJavaBlock start="<java\>[^>]*\>" end="</java>"me=e-7 contains=@gspJava,htmlTag
53 syn region gspInLine matchgroup=htmlError start="`" end="`" contains=@gspJava
55 let b:current_syntax = "gsp"
57 if main_syntax == 'gsp'