Mercurial > vim
annotate runtime/syntax/gsp.vim @ 10143:a1c1607b1528 v7.4.2342
commit https://github.com/vim/vim/commit/1b0c1d050e28f351650c0c84e234fd24f12e5e29
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Sep 6 23:23:52 2016 +0200
patch 7.4.2342
Problem: Typo in MS-Windows build script.
Solution: change "w2" to "22".
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 06 Sep 2016 23:30:06 +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 |