Last active
February 25, 2020 20:15
-
-
Save s0kil/cac5bdfb09304c4886762ea1bfb544be to your computer and use it in GitHub Desktop.
WebStorm EEx snippets (Live Templates)
This file contains hidden or 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
| <templateSet group="EEx snippets"> | |
| <template name="e=" value="<%= $END$ %>" description="EEx - Render Expression, replace with result" toReformat="true" toShortenFQNames="true"> | |
| <context> | |
| <option name="ELIXIR_CODE" value="true" /> | |
| </context> | |
| </template> | |
| <template name="ee" value="<% $END$ %>" description="EEx - Expression, inline with output" toReformat="true" toShortenFQNames="true"> | |
| <context> | |
| <option name="ELIXIR_CODE" value="true" /> | |
| </context> | |
| </template> | |
| <template name="eq" value="<%% $END$ %>" description="EEx - Quotation, returns the contents inside" toReformat="true" toShortenFQNames="true"> | |
| <context> | |
| <option name="ELIXIR_CODE" value="true" /> | |
| </context> | |
| </template> | |
| <template name="ec" value="<%# $END$ %>" description="EEx - Comments, they are discarded from source" toReformat="true" toShortenFQNames="true"> | |
| <context> | |
| <option name="ELIXIR_CODE" value="true" /> | |
| </context> | |
| </template> | |
| <template name="eend" value="<% end %>" description="EEx - end tag" toReformat="true" toShortenFQNames="true"> | |
| <context> | |
| <option name="ELIXIR_CODE" value="true" /> | |
| </context> | |
| </template> | |
| <template name="elt" value="<%= link "$text$", to: "$url$" %>" description="EEx - link" toReformat="true" toShortenFQNames="true"> | |
| <variable name="text" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <variable name="url" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <context> | |
| <option name="ELIXIR_CODE" value="true" /> | |
| </context> | |
| </template> | |
| <template name="er" value="<%= render("$template$", $key$: $key$) %>" description="EEx - Render template" toReformat="true" toShortenFQNames="true"> | |
| <variable name="template" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <variable name="key" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <context> | |
| <option name="ELIXIR_CODE" value="true" /> | |
| </context> | |
| </template> | |
| <template name="efor" value="<%= for $var$ <- $var$ do %>" description="EEx - for" toReformat="true" toShortenFQNames="true"> | |
| <variable name="var" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <context> | |
| <option name="ELIXIR_CODE" value="true" /> | |
| </context> | |
| </template> | |
| <template name="eif" value="<%= if $var$ do %> <% end %>" description="EEx - if" toReformat="true" toShortenFQNames="true"> | |
| <variable name="var" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <context> | |
| <option name="ELIXIR_CODE" value="true" /> | |
| </context> | |
| </template> | |
| <template name="eife" value="<%= if $1var$ do %> <% else %> <% end %>" description="EEx - if else" toReformat="true" toShortenFQNames="true"> | |
| <variable name="1var" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <context> | |
| <option name="ELIXIR_CODE" value="true" /> | |
| </context> | |
| </template> | |
| <template name="econd" value="<%= cond do %> $END$ <% end %>" description="EEx - cond" toReformat="true" toShortenFQNames="true"> | |
| <context> | |
| <option name="ELIXIR_CODE" value="true" /> | |
| </context> | |
| </template> | |
| <template name="eunless" value="<%= unless $var$ do %> <% end %>" description="EEx - unless" toReformat="true" toShortenFQNames="true"> | |
| <variable name="var" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <context> | |
| <option name="ELIXIR_CODE" value="true" /> | |
| </context> | |
| </template> | |
| <template name="eff" value="<%= form_for $form_data$, $action$, fn f -> %> <% end %>" description="EEx - Form, form_for" toReformat="true" toShortenFQNames="true"> | |
| <variable name="form_data" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <variable name="action" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <context> | |
| <option name="ELIXIR_CODE" value="true" /> | |
| </context> | |
| </template> | |
| <template name="efet" value="<%= error_tag $form$, $field$ %>" description="EEx - Form, error_tag" toReformat="true" toShortenFQNames="true"> | |
| <variable name="form" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <variable name="field" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <context> | |
| <option name="ELIXIR_CODE" value="true" /> | |
| </context> | |
| </template> | |
| <template name="ela" value="<%= label $form$, $field$, "$text$" %>" description="EEx - Form, label" toReformat="true" toShortenFQNames="true"> | |
| <variable name="form" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <variable name="field" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <variable name="text" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <context> | |
| <option name="ELIXIR_CODE" value="true" /> | |
| </context> | |
| </template> | |
| <template name="eti" value="<%= text_input $form$, $field$ %>" description="EEx - Form, text input" toReformat="true" toShortenFQNames="true"> | |
| <variable name="form" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <variable name="field" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <context> | |
| <option name="ELIXIR_CODE" value="true" /> | |
| </context> | |
| </template> | |
| <template name="epi" value="<%= password_input $form$, $field$ %>" description="EEx - Form, password input" toReformat="true" toShortenFQNames="true"> | |
| <variable name="form" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <variable name="field" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <context> | |
| <option name="ELIXIR_CODE" value="true" /> | |
| </context> | |
| </template> | |
| <template name="esubm" value="<%= submit "$text$" %>" description="EEx - Form, submit" toReformat="true" toShortenFQNames="true"> | |
| <variable name="text" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <context> | |
| <option name="ELIXIR_CODE" value="true" /> | |
| </context> | |
| </template> | |
| <template name="esubmc" value="<%= submit "$text$", class: "$class$" %>" description="EEx - Form, submit with class" toReformat="true" toShortenFQNames="true"> | |
| <variable name="text" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <variable name="class" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <context> | |
| <option name="ELIXIR_CODE" value="true" /> | |
| </context> | |
| </template> | |
| </templateSet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment