annotate runtime/syntax/jsp.vim @ 9123:b430d4f2aa79 v7.4.1845

commit https://github.com/vim/vim/commit/f8df45d84f1d17dced23e185d4835fc23406d73d Author: Bram Moolenaar <Bram@vim.org> Date: Wed May 25 21:48:13 2016 +0200 patch 7.4.1845 Problem: Mentioning NetBeans when reading from channel. (Ramel Eshed) Solution: Make the text more generic.
author Christian Brabandt <cb@256bit.org>
date Wed, 25 May 2016 22:00:06 +0200
parents 11730666460d
children 43efa4f5a8ea
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
2506
11730666460d Update for jsp syntax file.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
33 syn include @jspJava syntax/java.vim
7
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
2506
11730666460d Update for jsp syntax file.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
51 syn clear htmlTag
11730666460d Update for jsp syntax file.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
52 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
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 " 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
57 if version >= 508 || !exists("did_jsp_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 let did_jsp_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 " java.vim has redefined htmlComment highlighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 HiLink htmlComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 HiLink htmlCommentPart Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 " Be consistent with html highlight settings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 HiLink jspComment htmlComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink jspTag htmlTag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink jspDirective jspTag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink jspDirName htmlTagName
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink jspDirArg htmlArg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 HiLink jspCommand jspTag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 HiLink jspCommandName htmlTagName
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 HiLink jspCommandArg htmlArg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 if main_syntax == 'jsp'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 unlet main_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 let b:current_syntax = "jsp"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 " vim: ts=8