I have some issues with the built in syntax highlighting for JSP pages in Sublime Text 2.
See the code after the white line on line 11/12: The HTML tag <strong> is displayed correctly here.
The code before this line is not correctly colored: The second JSP closing tag (%>) is in red, but should be in orange like the first one and the HTML tags inside are recognized as Java code I think, although the scopes (visible with CTRL+SHIFT+ALT+P as text.html.jsp) do not change.

If I do the same with <?php or <? starting and ?> closing tags the problem does not exist, all colors seem to be right then.
Did anyone have the same problem? I made sure that the syntax is set to JavaServerPages (JSP).
I think the problem relates to these lines in HTML.tmLanguage file (JSP scope is inside HTML scope):
<dict>
<key>embedded-code</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#ruby</string>
</dict>
<dict>
<key>include</key>
<string>#php</string>
</dict>
<!--
<dict>
<key>include</key>
<string>#smarty</string>
</dict>
-->
<dict>
<key>include</key>
<string>#python</string>
</dict>
</array>
</dict>
There is no include for JSP. But I’m only guessing… Any ideas?
I managed to edit the
HTML.tmLanguageandJava Server Pages (JSP).tmLanguagefiles now… some matches for ruby overwrote the jsp scopes inside HTML<script>tags and I removed the match for curly brackets, and additionally I added sometext.html.jspincludes to a few scope definitions.I copied my
.tmThemefile and put it into theUserpackage folder asUser.tmTheme. I then added these lines to this file at the bottom:I then edited these two files in the folders
HTMLandJavaand commented out some ruby includes and stuff.See the files here:
HTML.tmLanguage
Java Server Pages (JSP).tmLanguage
JavaScript.tmLanguage