Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
10047:a62862410ca1 | 10048:43efa4f5a8ea |
---|---|
4 " URL: http://rgarciasuarez.free.fr/vim/syntax/jsp.vim | 4 " URL: http://rgarciasuarez.free.fr/vim/syntax/jsp.vim |
5 " Last change: 2004 Feb 02 | 5 " Last change: 2004 Feb 02 |
6 " Credits : Patch by Darren Greaves (recognizes <jsp:...> tags) | 6 " Credits : Patch by Darren Greaves (recognizes <jsp:...> tags) |
7 " Patch by Thomas Kimpton (recognizes jspExpr inside HTML tags) | 7 " Patch by Thomas Kimpton (recognizes jspExpr inside HTML tags) |
8 | 8 |
9 " For version 5.x: Clear all syntax items | 9 " quit when a syntax file was already loaded |
10 " For version 6.x: Quit when a syntax file was already loaded | 10 if exists("b:current_syntax") |
11 if version < 600 | |
12 syntax clear | |
13 elseif exists("b:current_syntax") | |
14 finish | 11 finish |
15 endif | 12 endif |
16 | 13 |
17 if !exists("main_syntax") | 14 if !exists("main_syntax") |
18 let main_syntax = 'jsp' | 15 let main_syntax = 'jsp' |
19 endif | 16 endif |
20 | 17 |
21 " Source HTML syntax | 18 " Source HTML syntax |
22 if version < 600 | 19 runtime! syntax/html.vim |
23 source <sfile>:p:h/html.vim | |
24 else | |
25 runtime! syntax/html.vim | |
26 endif | |
27 unlet b:current_syntax | 20 unlet b:current_syntax |
28 | 21 |
29 " Next syntax items are case-sensitive | 22 " Next syntax items are case-sensitive |
30 syn case match | 23 syn case match |
31 | 24 |
50 " Redefine htmlTag so that it can contain jspExpr | 43 " Redefine htmlTag so that it can contain jspExpr |
51 syn clear htmlTag | 44 syn clear htmlTag |
52 syn region htmlTag start=+<[^/%]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,jspExpr,javaScript | 45 syn region htmlTag start=+<[^/%]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,jspExpr,javaScript |
53 | 46 |
54 " Define the default highlighting. | 47 " Define the default highlighting. |
55 " For version 5.7 and earlier: only when not done already | 48 " Only when an item doesn't have highlighting yet |
56 " For version 5.8 and later: only when an item doesn't have highlighting yet | 49 command -nargs=+ HiLink hi def link <args> |
57 if version >= 508 || !exists("did_jsp_syn_inits") | 50 " java.vim has redefined htmlComment highlighting |
58 if version < 508 | 51 HiLink htmlComment Comment |
59 let did_jsp_syn_inits = 1 | 52 HiLink htmlCommentPart Comment |
60 command -nargs=+ HiLink hi link <args> | 53 " Be consistent with html highlight settings |
61 else | 54 HiLink jspComment htmlComment |
62 command -nargs=+ HiLink hi def link <args> | 55 HiLink jspTag htmlTag |
63 endif | 56 HiLink jspDirective jspTag |
64 " java.vim has redefined htmlComment highlighting | 57 HiLink jspDirName htmlTagName |
65 HiLink htmlComment Comment | 58 HiLink jspDirArg htmlArg |
66 HiLink htmlCommentPart Comment | 59 HiLink jspCommand jspTag |
67 " Be consistent with html highlight settings | 60 HiLink jspCommandName htmlTagName |
68 HiLink jspComment htmlComment | 61 HiLink jspCommandArg htmlArg |
69 HiLink jspTag htmlTag | 62 delcommand HiLink |
70 HiLink jspDirective jspTag | |
71 HiLink jspDirName htmlTagName | |
72 HiLink jspDirArg htmlArg | |
73 HiLink jspCommand jspTag | |
74 HiLink jspCommandName htmlTagName | |
75 HiLink jspCommandArg htmlArg | |
76 delcommand HiLink | |
77 endif | |
78 | 63 |
79 if main_syntax == 'jsp' | 64 if main_syntax == 'jsp' |
80 unlet main_syntax | 65 unlet main_syntax |
81 endif | 66 endif |
82 | 67 |