annotate runtime/syntax/jsp.vim @ 1339:3bfd2e1e2609 v7.1.053

updated for version 7.1-053
author vimboss
date Sun, 05 Aug 2007 17:20:43 +0000
parents 3fc0f57ecb91
children 11730666460d
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 if !exists("main_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 let main_syntax = 'jsp'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " Source HTML syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 source <sfile>:p:h/html.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 runtime! syntax/html.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " Next syntax items are case-sensitive
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " Include Java syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn include @jspJava <sfile>:p:h/java.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn region jspScriptlet matchgroup=jspTag start=/<%/ keepend end=/%>/ contains=@jspJava
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn region jspComment start=/<%--/ end=/--%>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn region jspDecl matchgroup=jspTag start=/<%!/ keepend end=/%>/ contains=@jspJava
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn region jspExpr matchgroup=jspTag start=/<%=/ keepend end=/%>/ contains=@jspJava
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn region jspDirective start=/<%@/ end=/%>/ contains=htmlString,jspDirName,jspDirArg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword jspDirName contained include page taglib
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword jspDirArg contained file uri prefix language extends import session buffer autoFlush
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword jspDirArg contained isThreadSafe info errorPage contentType isErrorPage
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn region jspCommand start=/<jsp:/ start=/<\/jsp:/ keepend end=/>/ end=/\/>/ contains=htmlString,jspCommandName,jspCommandArg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn keyword jspCommandName contained include forward getProperty plugin setProperty useBean param params fallback
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword jspCommandArg contained id scope class type beanName page flush name value property
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword jspCommandArg contained code codebase name archive align height
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn keyword jspCommandArg contained width hspace vspace jreversion nspluginurl iepluginurl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " Redefine htmlTag so that it can contain jspExpr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn region htmlTag start=+<[^/%]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,jspExpr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 if version >= 508 || !exists("did_jsp_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 let did_jsp_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 " java.vim has redefined htmlComment highlighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 HiLink htmlComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 HiLink htmlCommentPart Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 " Be consistent with html highlight settings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 HiLink jspComment htmlComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 HiLink jspTag htmlTag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink jspDirective jspTag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink jspDirName htmlTagName
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink jspDirArg htmlArg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink jspCommand jspTag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 HiLink jspCommandName htmlTagName
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 HiLink jspCommandArg htmlArg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 if main_syntax == 'jsp'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 unlet main_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 let b:current_syntax = "jsp"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 " vim: ts=8