forked from guillaumebort/play2-sublimetext2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e68ba7
commit efd9025
Showing
8 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
${1:form}.bindFromRequest.fold ( | ||
formWithErrors => BadRequest( ${2:"You need to pass a 'xxx' value!"} ), | ||
{ maybeValue => | ||
${3:Ok} | ||
} | ||
) | ||
]]></content> | ||
<tabTrigger>bindform</tabTrigger> | ||
<scope>source.scala</scope> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
val maybe: Option[${1:String}] = Cache.getAs[${1:String}]("${2:item.key}") | ||
]]></content> | ||
<tabTrigger>cacheget</tabTrigger> | ||
<scope>source.scala</scope> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
Cache.set("${1:item.key}", $2) | ||
]]></content> | ||
<tabTrigger>cacheset</tabTrigger> | ||
<scope>source.scala</scope> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
val ${1:form} = Form( "${2:param1}" -> ${3:text} ) | ||
]]></content> | ||
<tabTrigger>form</tabTrigger> | ||
<scope>source.scala</scope> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
Ok( views.html.${1:index}($2) ) | ||
]]></content> | ||
<tabTrigger>ok</tabTrigger> | ||
<scope>source.scala</scope> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
Redirect( routes.Application.${1:index()} ) | ||
]]></content> | ||
<tabTrigger>redirect</tabTrigger> | ||
<scope>source.scala</scope> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
request.session.get("${1:key}")${2://}.map { $3 }.getOrElse { $4 } | ||
]]></content> | ||
<tabTrigger>sessionget</tabTrigger> | ||
<scope>source.scala</scope> | ||
</snippet> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
Ok( views.html.${1:index}($2) ).withSession( | ||
session + ("${3:key}" -> "${4:value}") | ||
) | ||
]]></content> | ||
<tabTrigger>sessionset</tabTrigger> | ||
<scope>source.scala</scope> | ||
</snippet> | ||
|
||
|