annotate runtime/syntax/gsp.vim @ 1651:9c5a9e4356f8 v7.2a.003

updated for version 7.2a-003
author vimboss
date Fri, 27 Jun 2008 18:42:32 +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: GSP - GNU Server Pages (v. 0.86)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Created By: Nathaniel Harward nharward@yahoo.com
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Changed: Dec. 12, 2000
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Filenames: *.gsp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " URL: http://www.constructicon.com/~nharward/vim/syntax/gsp.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 if !exists("main_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 let main_syntax = 'gsp'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " Source HTML syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 source <sfile>:p:h/html.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 runtime! syntax/html.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " Include Java syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn include @gspJava <sfile>:p:h/java.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn include @gspJava syntax/java.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 " Add <java> as an HTML tag name along with its args
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn keyword htmlTagName contained java
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword htmlArg contained type file page
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 " Redefine some HTML things to include (and highlight) gspInLine code in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " places where it's likely to be found
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,gspInLine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,gspInLine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc,gspInLine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError,gspInLine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn region htmlTag start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,gspInLine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster,gspInLine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster,gspInLine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 " Define the GSP java code blocks
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn region gspJavaBlock start="<java\>[^>]*\>" end="</java>"me=e-7 contains=@gspJava,htmlTag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn region gspInLine matchgroup=htmlError start="`" end="`" contains=@gspJava
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 let b:current_syntax = "gsp"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 if main_syntax == 'gsp'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 unlet main_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 endif