diff options
author | Bram Moolenaar <Bram@vim.org> | 2004-06-13 20:20:40 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2004-06-13 20:20:40 +0000 |
commit | 071d4279d6ab81b7187b48f3a0fc61e587b6db6c (patch) | |
tree | 221cbe3c40e043163c06f61c52a7ba2eb41e12ce /runtime/syntax/gsp.vim | |
parent | b4210b3bc14e2918f153a7307530fbe6eba659e1 (diff) | |
download | vim-git-071d4279d6ab81b7187b48f3a0fc61e587b6db6c.tar.gz |
updated for version 7.0001v7.0001
Diffstat (limited to 'runtime/syntax/gsp.vim')
-rw-r--r-- | runtime/syntax/gsp.vim | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/runtime/syntax/gsp.vim b/runtime/syntax/gsp.vim new file mode 100644 index 000000000..e7766c5b5 --- /dev/null +++ b/runtime/syntax/gsp.vim @@ -0,0 +1,59 @@ +" Vim syntax file +" Language: GSP - GNU Server Pages (v. 0.86) +" Created By: Nathaniel Harward nharward@yahoo.com +" Last Changed: Dec. 12, 2000 +" Filenames: *.gsp +" URL: http://www.constructicon.com/~nharward/vim/syntax/gsp.vim + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'gsp' +endif + +" Source HTML syntax +if version < 600 + source <sfile>:p:h/html.vim +else + runtime! syntax/html.vim +endif +unlet b:current_syntax + +syn case match + +" Include Java syntax +if version < 600 + syn include @gspJava <sfile>:p:h/java.vim +else + syn include @gspJava syntax/java.vim +endif + +" Add <java> as an HTML tag name along with its args +syn keyword htmlTagName contained java +syn keyword htmlArg contained type file page + +" Redefine some HTML things to include (and highlight) gspInLine code in +" places where it's likely to be found +syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,gspInLine +syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,gspInLine +syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc,gspInLine +syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError,gspInLine +syn region htmlTag start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,gspInLine +syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster,gspInLine +syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster,gspInLine + +" Define the GSP java code blocks +syn region gspJavaBlock start="<java\>[^>]*\>" end="</java>"me=e-7 contains=@gspJava,htmlTag +syn region gspInLine matchgroup=htmlError start="`" end="`" contains=@gspJava + +let b:current_syntax = "gsp" + +if main_syntax == 'gsp' + unlet main_syntax +endif |