Mercurial > vim
annotate runtime/syntax/gsp.vim @ 20310:fb099a566102
Added tag v8.2.0710 for changeset cae01dabd78e679e3f2170a7bf9781d10ca3fc3e
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 07 May 2020 18:30:05 +0200 |
parents | 43efa4f5a8ea |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: GSP - GNU Server Pages (v. 0.86) | |
3 " Created By: Nathaniel Harward nharward@yahoo.com | |
3256 | 4 " Last Changed: 2012 Jan 08 by Thilo Six |
7 | 5 " Filenames: *.gsp |
6 " URL: http://www.constructicon.com/~nharward/vim/syntax/gsp.vim | |
7 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3256
diff
changeset
|
8 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3256
diff
changeset
|
9 if exists("b:current_syntax") |
7 | 10 finish |
11 endif | |
12 | |
13 if !exists("main_syntax") | |
14 let main_syntax = 'gsp' | |
15 endif | |
16 | |
17 " Source HTML syntax | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3256
diff
changeset
|
18 runtime! syntax/html.vim |
7 | 19 unlet b:current_syntax |
20 | |
21 syn case match | |
22 | |
23 " Include Java syntax | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3256
diff
changeset
|
24 syn include @gspJava syntax/java.vim |
7 | 25 |
3256 | 26 let s:cpo_save = &cpo |
27 set cpo&vim | |
28 | |
7 | 29 " Add <java> as an HTML tag name along with its args |
30 syn keyword htmlTagName contained java | |
31 syn keyword htmlArg contained type file page | |
32 | |
33 " Redefine some HTML things to include (and highlight) gspInLine code in | |
34 " places where it's likely to be found | |
35 syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,gspInLine | |
36 syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,gspInLine | |
37 syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc,gspInLine | |
38 syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError,gspInLine | |
39 syn region htmlTag start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,gspInLine | |
40 syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster,gspInLine | |
41 syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster,gspInLine | |
42 | |
43 " Define the GSP java code blocks | |
44 syn region gspJavaBlock start="<java\>[^>]*\>" end="</java>"me=e-7 contains=@gspJava,htmlTag | |
45 syn region gspInLine matchgroup=htmlError start="`" end="`" contains=@gspJava | |
46 | |
47 let b:current_syntax = "gsp" | |
48 | |
49 if main_syntax == 'gsp' | |
50 unlet main_syntax | |
51 endif | |
3256 | 52 |
53 let &cpo = s:cpo_save | |
54 unlet s:cpo_save |