annotate runtime/syntax/jsp.vim @ 10170:4acacf4081ce v7.4.2355

commit https://github.com/vim/vim/commit/16b3578f355282846f2600ce77fb344950f0b9ce Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 9 20:29:50 2016 +0200 patch 7.4.2355 Problem: Regexp fails to match when using "\>\)\?". (Ramel) Solution: When a state is already in the list, but addstate_here() is used and the existing state comes later, add the new state anyway.
author Christian Brabandt <cb@256bit.org>
date Fri, 09 Sep 2016 20:30:07 +0200
parents 46763b01cd9a
children
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: JSP (Java Server Pages)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Rafael Garcia-Suarez <rgarciasuarez@free.fr>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " URL: http://rgarciasuarez.free.fr/vim/syntax/jsp.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Last change: 2004 Feb 02
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Credits : Patch by Darren Greaves (recognizes <jsp:...> tags)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " Patch by Thomas Kimpton (recognizes jspExpr inside HTML tags)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2506
diff changeset
9 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2506
diff changeset
10 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 if !exists("main_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 let main_syntax = 'jsp'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " Source HTML syntax
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2506
diff changeset
19 runtime! syntax/html.vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " Next syntax items are case-sensitive
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " Include Java syntax
2506
11730666460d Update for jsp syntax file.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
26 syn include @jspJava syntax/java.vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn region jspScriptlet matchgroup=jspTag start=/<%/ keepend end=/%>/ contains=@jspJava
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn region jspComment start=/<%--/ end=/--%>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn region jspDecl matchgroup=jspTag start=/<%!/ keepend end=/%>/ contains=@jspJava
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn region jspExpr matchgroup=jspTag start=/<%=/ keepend end=/%>/ contains=@jspJava
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn region jspDirective start=/<%@/ end=/%>/ contains=htmlString,jspDirName,jspDirArg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword jspDirName contained include page taglib
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword jspDirArg contained file uri prefix language extends import session buffer autoFlush
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword jspDirArg contained isThreadSafe info errorPage contentType isErrorPage
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn region jspCommand start=/<jsp:/ start=/<\/jsp:/ keepend end=/>/ end=/\/>/ contains=htmlString,jspCommandName,jspCommandArg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn keyword jspCommandName contained include forward getProperty plugin setProperty useBean param params fallback
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword jspCommandArg contained id scope class type beanName page flush name value property
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn keyword jspCommandArg contained code codebase name archive align height
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword jspCommandArg contained width hspace vspace jreversion nspluginurl iepluginurl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 " Redefine htmlTag so that it can contain jspExpr
2506
11730666460d Update for jsp syntax file.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
44 syn clear htmlTag
11730666460d Update for jsp syntax file.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
45 syn region htmlTag start=+<[^/%]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,jspExpr,javaScript
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2506
diff changeset
48 " Only when an item doesn't have highlighting yet
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2506
diff changeset
49 " java.vim has redefined htmlComment highlighting
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
50 hi def link htmlComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
51 hi def link htmlCommentPart Comment
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2506
diff changeset
52 " Be consistent with html highlight settings
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
53 hi def link jspComment htmlComment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
54 hi def link jspTag htmlTag
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
55 hi def link jspDirective jspTag
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
56 hi def link jspDirName htmlTagName
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
57 hi def link jspDirArg htmlArg
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
58 hi def link jspCommand jspTag
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
59 hi def link jspCommandName htmlTagName
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
60 hi def link jspCommandArg htmlArg
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 if main_syntax == 'jsp'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 unlet main_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 let b:current_syntax = "jsp"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 " vim: ts=8