Mercurial > vim
annotate runtime/syntax/jsp.vim @ 10048:43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 23:26:57 2016 +0200
Updated runtime files. Remove version checks for Vim older than 6.0.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 23:30:09 +0200 |
parents | 11730666460d |
children | 46763b01cd9a |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: JSP (Java Server Pages) | |
3 " Maintainer: Rafael Garcia-Suarez <rgarciasuarez@free.fr> | |
4 " URL: http://rgarciasuarez.free.fr/vim/syntax/jsp.vim | |
5 " Last change: 2004 Feb 02 | |
6 " Credits : Patch by Darren Greaves (recognizes <jsp:...> tags) | |
7 " Patch by Thomas Kimpton (recognizes jspExpr inside HTML tags) | |
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 | 11 finish |
12 endif | |
13 | |
14 if !exists("main_syntax") | |
15 let main_syntax = 'jsp' | |
16 endif | |
17 | |
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 | 20 unlet b:current_syntax |
21 | |
22 " Next syntax items are case-sensitive | |
23 syn case match | |
24 | |
25 " Include Java syntax | |
2506 | 26 syn include @jspJava syntax/java.vim |
7 | 27 |
28 syn region jspScriptlet matchgroup=jspTag start=/<%/ keepend end=/%>/ contains=@jspJava | |
29 syn region jspComment start=/<%--/ end=/--%>/ | |
30 syn region jspDecl matchgroup=jspTag start=/<%!/ keepend end=/%>/ contains=@jspJava | |
31 syn region jspExpr matchgroup=jspTag start=/<%=/ keepend end=/%>/ contains=@jspJava | |
32 syn region jspDirective start=/<%@/ end=/%>/ contains=htmlString,jspDirName,jspDirArg | |
33 | |
34 syn keyword jspDirName contained include page taglib | |
35 syn keyword jspDirArg contained file uri prefix language extends import session buffer autoFlush | |
36 syn keyword jspDirArg contained isThreadSafe info errorPage contentType isErrorPage | |
37 syn region jspCommand start=/<jsp:/ start=/<\/jsp:/ keepend end=/>/ end=/\/>/ contains=htmlString,jspCommandName,jspCommandArg | |
38 syn keyword jspCommandName contained include forward getProperty plugin setProperty useBean param params fallback | |
39 syn keyword jspCommandArg contained id scope class type beanName page flush name value property | |
40 syn keyword jspCommandArg contained code codebase name archive align height | |
41 syn keyword jspCommandArg contained width hspace vspace jreversion nspluginurl iepluginurl | |
42 | |
43 " Redefine htmlTag so that it can contain jspExpr | |
2506 | 44 syn clear htmlTag |
45 syn region htmlTag start=+<[^/%]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,jspExpr,javaScript | |
7 | 46 |
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 command -nargs=+ HiLink hi def link <args> |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2506
diff
changeset
|
50 " java.vim has redefined htmlComment highlighting |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2506
diff
changeset
|
51 HiLink htmlComment Comment |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2506
diff
changeset
|
52 HiLink htmlCommentPart Comment |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2506
diff
changeset
|
53 " Be consistent with html highlight settings |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2506
diff
changeset
|
54 HiLink jspComment htmlComment |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2506
diff
changeset
|
55 HiLink jspTag htmlTag |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2506
diff
changeset
|
56 HiLink jspDirective jspTag |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2506
diff
changeset
|
57 HiLink jspDirName htmlTagName |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2506
diff
changeset
|
58 HiLink jspDirArg htmlArg |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2506
diff
changeset
|
59 HiLink jspCommand jspTag |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2506
diff
changeset
|
60 HiLink jspCommandName htmlTagName |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2506
diff
changeset
|
61 HiLink jspCommandArg htmlArg |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2506
diff
changeset
|
62 delcommand HiLink |
7 | 63 |
64 if main_syntax == 'jsp' | |
65 unlet main_syntax | |
66 endif | |
67 | |
68 let b:current_syntax = "jsp" | |
69 | |
70 " vim: ts=8 |