Mercurial > vim
annotate runtime/syntax/gsp.vim @ 21152:1561311249bb v8.2.1127
patch 8.2.1127: Vim9: getting a dict member may not work
Commit: https://github.com/vim/vim/commit/fb9d5c51c8b5b44863f974e1adbee9ae330e75ff
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 4 19:19:43 2020 +0200
patch 8.2.1127: Vim9: getting a dict member may not work
Problem: Vim9: getting a dict member may not work.
Solution: Clear the dict only after copying the item. (closes https://github.com/vim/vim/issues/6390)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 04 Jul 2020 19:30:04 +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 |