| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | " Vim syntax file | 
					
						
							|  |  |  | " Language:	GSP - GNU Server Pages (v. 0.86) | 
					
						
							|  |  |  | " Created By:	Nathaniel Harward nharward@yahoo.com | 
					
						
							| 
									
										
										
										
											2012-01-10 14:55:01 +01:00
										 |  |  | " Last Changed: 2012 Jan 08 by Thilo Six | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | " Filenames:    *.gsp | 
					
						
							|  |  |  | " URL:		http://www.constructicon.com/~nharward/vim/syntax/gsp.vim | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-08-30 23:26:57 +02:00
										 |  |  | " quit when a syntax file was already loaded | 
					
						
							|  |  |  | if exists("b:current_syntax") | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  |   finish | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if !exists("main_syntax") | 
					
						
							|  |  |  |   let main_syntax = 'gsp' | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | " Source HTML syntax | 
					
						
							| 
									
										
										
										
											2016-08-30 23:26:57 +02:00
										 |  |  | runtime! syntax/html.vim | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | unlet b:current_syntax | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | syn case match | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | " Include Java syntax | 
					
						
							| 
									
										
										
										
											2016-08-30 23:26:57 +02:00
										 |  |  | syn include @gspJava syntax/java.vim | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-10 14:55:01 +01:00
										 |  |  | let s:cpo_save = &cpo | 
					
						
							|  |  |  | set cpo&vim | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | " 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 | 
					
						
							| 
									
										
										
										
											2012-01-10 14:55:01 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | let &cpo = s:cpo_save | 
					
						
							|  |  |  | unlet s:cpo_save |