-
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
pmannel
committed
Oct 8, 2016
1 parent
93aba39
commit 3c0c026
Showing
2 changed files
with
125 additions
and
1 deletion.
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 |
---|---|---|
@@ -1,2 +1,46 @@ | ||
# htl-live-templates | ||
HTL Live Templates | ||
HTL Live Templates | ||
|
||
# HTL Live Templates for IntelliJ IDEA | ||
|
||
Simplifies writing [HTL](https://docs.adobe.com/docs/en/htl/docs/getting-started.html) Markup in IntelliJ via Live Templates | ||
|
||
### Usage | ||
Write "sly-command" or only $ in your html file and press Tab for auto-completion. | ||
Depending on the command, the markup is generated automatically. | ||
|
||
### Commands: | ||
#### $ | ||
>${$VAR0$} | ||
#### sly-use | ||
><sly data-sly-use.$VAR0$="$className$" /> | ||
#### sly-text | ||
>data-sly-text="${$VAR0$ @ context=$VAR1$}" | ||
#### sly-test | ||
>data-sly-test="${$VAR0$}" | ||
#### sly-template | ||
><template data-sly-template.$VAR0$="${ @ $VAR1$}"> | ||
$END$ | ||
</template> | ||
#### sly-resource | ||
>data-sly-resource="${'$VAR0$' @ resourceType='$VAR1$'}" | ||
#### sly-repeat | ||
>data-sly-repeat="${$VAR0$}" | ||
#### sly-list | ||
> <sly data-sly-list.$VAR0$="${$VAR1$}"> | ||
$END$ | ||
</sly> | ||
#### sly-include | ||
>data-sly-include="$VAR0$" | ||
#### sly-comment | ||
><!--/* $VAR0$ */--> | ||
#### sly-call | ||
>data-sly-call="${$VAR0$ @ $VAR1$}" | ||
#### sly-attribute | ||
>data-sly-attribute="${$VAR0$}" | ||
### Installation | ||
|
||
Download [latest release](https://github.com/pmannel/htl-live-templates/releases). | ||
|
||
Install to IntelliJ IDEA, see https://www.jetbrains.com/help/idea/2016.2/sharing-live-templates.html |
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,80 @@ | ||
<templateSet group="HTL"> | ||
<template name="sly-use" value="<sly data-sly-use.$VAR0$="$className$" />" description="data-sly-use" toReformat="false" toShortenFQNames="true"> | ||
<variable name="VAR0" expression="" defaultValue="" alwaysStopAt="true" /> | ||
<variable name="className" expression="" defaultValue="" alwaysStopAt="true" /> | ||
<context> | ||
<option name="HTML" value="true" /> | ||
</context> | ||
</template> | ||
<template name="sly-test" value="data-sly-test="${$VAR0$}"" description="data-sly-test" toReformat="false" toShortenFQNames="true"> | ||
<variable name="VAR0" expression="" defaultValue="" alwaysStopAt="true" /> | ||
<context> | ||
<option name="HTML" value="true" /> | ||
</context> | ||
</template> | ||
<template name="sly-resource" value="data-sly-resource="${'$VAR0$' @ resourceType='$VAR1$'}"" description="data-sly-resource" toReformat="false" toShortenFQNames="true"> | ||
<variable name="VAR0" expression="" defaultValue="" alwaysStopAt="true" /> | ||
<variable name="VAR1" expression="" defaultValue="" alwaysStopAt="true" /> | ||
<context> | ||
<option name="HTML" value="true" /> | ||
</context> | ||
</template> | ||
<template name="sly-include" value="data-sly-include="$VAR0$"" description="data-sly-include" toReformat="false" toShortenFQNames="true"> | ||
<variable name="VAR0" expression="" defaultValue="" alwaysStopAt="true" /> | ||
<context> | ||
<option name="HTML" value="true" /> | ||
</context> | ||
</template> | ||
<template name="sly-template" value="<template data-sly-template.$VAR0$="${ @ $VAR1$}"> $END$ </template>" description="data-sly-template" toReformat="false" toShortenFQNames="true"> | ||
<variable name="VAR0" expression="" defaultValue="" alwaysStopAt="true" /> | ||
<variable name="VAR1" expression="" defaultValue="" alwaysStopAt="true" /> | ||
<context> | ||
<option name="HTML" value="true" /> | ||
</context> | ||
</template> | ||
<template name="sly-call" value="data-sly-call="${$VAR0$ @ $VAR1$}"" description="data-sly-call" toReformat="false" toShortenFQNames="true"> | ||
<variable name="VAR0" expression="" defaultValue="" alwaysStopAt="true" /> | ||
<variable name="VAR1" expression="" defaultValue="" alwaysStopAt="true" /> | ||
<context> | ||
<option name="HTML" value="true" /> | ||
</context> | ||
</template> | ||
<template name="sly-text" value="data-sly-text="${$VAR0$ @ context=$VAR1$}"" description="data-sly-text" toReformat="false" toShortenFQNames="true"> | ||
<variable name="VAR0" expression="" defaultValue="" alwaysStopAt="true" /> | ||
<variable name="VAR1" expression="" defaultValue="unsafe" alwaysStopAt="true" /> | ||
<context> | ||
<option name="HTML" value="true" /> | ||
</context> | ||
</template> | ||
<template name="sly-attribute" value="data-sly-attribute="${$VAR0$}"" description="data-sly-attribute" toReformat="false" toShortenFQNames="true"> | ||
<variable name="VAR0" expression="" defaultValue="" alwaysStopAt="true" /> | ||
<context> | ||
<option name="HTML" value="true" /> | ||
</context> | ||
</template> | ||
<template name="sly-list" value=" <sly data-sly-list.$VAR0$="${$VAR1$}"> $END$ </sly>" description="data-sly-list" toReformat="false" toShortenFQNames="true"> | ||
<variable name="VAR0" expression="" defaultValue="item" alwaysStopAt="true" /> | ||
<variable name="VAR1" expression="" defaultValue="" alwaysStopAt="true" /> | ||
<context> | ||
<option name="HTML" value="true" /> | ||
</context> | ||
</template> | ||
<template name="$" value="${$VAR0$}" description="htl attribute" toReformat="false" toShortenFQNames="true"> | ||
<variable name="VAR0" expression="" defaultValue="" alwaysStopAt="true" /> | ||
<context> | ||
<option name="HTML" value="true" /> | ||
</context> | ||
</template> | ||
<template name="sly-comment" value="<!--/* $VAR0$ */-->" description="htl comment" toReformat="false" toShortenFQNames="true"> | ||
<variable name="VAR0" expression="" defaultValue="" alwaysStopAt="true" /> | ||
<context> | ||
<option name="HTML" value="true" /> | ||
</context> | ||
</template> | ||
<template name="sly-repeat" value="data-sly-repeat="${$VAR0$}"" description="data-sly-repeat" toReformat="false" toShortenFQNames="true"> | ||
<variable name="VAR0" expression="" defaultValue="" alwaysStopAt="true" /> | ||
<context> | ||
<option name="HTML" value="true" /> | ||
</context> | ||
</template> | ||
</templateSet> |