Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make multi line JSP snippet bodies multi line strings
  • Loading branch information
MoritzKn committed Oct 16, 2016
commit 27d117e5c276509f51884272141270cc71ae2f14
117 changes: 94 additions & 23 deletions snippets/language-java.cson
Original file line number Diff line number Diff line change
Expand Up @@ -130,60 +130,131 @@
'prefix': 'wh'
'body': 'while ($1) {\n\t$0\n}'
'.text.html.jsp':
'el':
'prefix': '$'
'body': '\\${$1}'
'scriptlet':
'prefix': '%'
'body': '<%\n\t$1\n%>'
'scriptlet (xml)':
'prefix': 'scriptlet'
'body': '<jsp:scriptlet>\n\t$1\n</jsp:scriptlet>'
'body': """
<%
\t$1
%>
"""
'declaration':
'prefix': '%!'
'body': '<%!\n\t$1\n%>'
'body': """
<%!
\t$1
%>
"""
'declaration (xml)':
'prefix': 'declaration'
'body': '<jsp:declaration>\n\t$1\n</jsp:declaration>'
'body': """
<jsp:declaration>
\t$1
</jsp:declaration>
"""
'expression':
'prefix': '%='
'body': '<%=\n\t$1\n%>'
'body': """
<%=
\t$1
%>
"""
'expression (xml)':
'prefix': 'expression'
'body': '<jsp:expression>\n\t$1\n</jsp:expression>'
'body': """
<jsp:expression>
\t$1
</jsp:expression>
"""
'comment':
'prefix': '%--'
'body': '<%--\n\t$1\n--%>'
'el':
'prefix': '$'
'body': '\\${$1}'
'body': """
<%--
\t$1
--%>
"""
'scriptlet (xml)':
'prefix': 'scriptlet'
'body': """
<jsp:scriptlet>
\t$1
</jsp:scriptlet>
"""
'c:out':
'prefix': 'out'
'body': '<c:out value="\\${$1}"/>'
'body': """
<c:out value="\\${$1}"/>
"""
'c:set':
'prefix': 'set'
'body': '<c:set var="${1:name}" value="\\${$2}"/>'
'body': """
<c:set var="${1:name}" value="\\${$2}"/>
"""
'c:remove':
'prefix': 'rm'
'body': '<c:remove var="${1:name}"/>'
'body': """
<c:remove var="${1:name}"/>
"""
'c:catch':
'prefix': 'catch'
'body': '<c:catch var="${1:ex}">\n\t$2\n</c:catch>'
'body': """
<c:catch var="${1:ex}">
\t$2
</c:catch>
"""
'c:if':
'prefix': 'if'
'body': '<c:if test="\\${${1:true}}">\n\t$0\n</c:if>'
'body': """
<c:if test="\\${${1:true}}">
\t$0
</c:if>
"""
'c:choose':
'prefix': 'choose'
'body': '<c:choose>\n\t<c:when test="\\${${1:true}}">\n\t\t$2\n\t</c:when>$3\n\t<c:otherwise>\n\t\t$4\n\t</c:otherwise>\n</c:choose>'
'body': """
<c:choose>
\t<c:when test="\\${${1:true}}">
\t\t$2
\t</c:when>$3
\t<c:otherwise>
\t\t$4
\t</c:otherwise>
</c:choose>
"""
'c:when':
'prefix': 'when'
'body': '<c:when test="\\${${1:true}}">\n\t$2\n</c:when>'
'body': """
<c:when test="\\${${1:true}}">
\t$2
</c:when>
"""
'c:otherwise':
'prefix': 'other'
'body': '<c:otherwise>\n\t$1\n</c:otherwise>'
'body': """
<c:otherwise>
\t$1
</c:otherwise>
"""
'c:forEach':
'prefix': 'forEach'
'body': '<c:forEach var="${1:i}" begin="$2" end="$3">\n\t$4\n</c:forEach>'
'body': """
<c:forEach var="${1:i}" begin="$2" end="$3">
\t$4
</c:forEach>
"""
'c:forEach':
'prefix': 'forEachIn'
'body': '<c:forEach var="${1:item}" items="$2">\n\t$3\n</c:forEach>'
'body': """
<c:forEach var="${1:item}" items="$2">
\t$3
</c:forEach>
"""
'c:forTokens':
'prefix': 'forTokens'
'body': '<c:forTokens var="${1:item}" items="$2" delims="${3:,}">\n\t$4\n</c:forTokens>'
'body': """
<c:forTokens var="${1:item}" items="$2" delims="${3:,}">
\t$4
</c:forTokens>
"""