From 1f0932bba584371e4bbd7fc580fe07501ec2ef35 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Mon, 16 Mar 2015 23:06:58 +0000 Subject: [PATCH] eelixir form_tag, link --- UltiSnips/eelixir.snippets | 16 +++++++++++++--- snippets/eelixir.snippets | 12 +++++++++++- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/UltiSnips/eelixir.snippets b/UltiSnips/eelixir.snippets index 79257ef..5b40290 100644 --- a/UltiSnips/eelixir.snippets +++ b/UltiSnips/eelixir.snippets @@ -3,13 +3,23 @@ priority -50 extends html snippet % "<% %>" w - <% ${0} %> +<% $0 %> endsnippet snippet = "<%= %>" w - <%= ${1} %> +<%= $0 %> endsnippet snippet end "<% end %>" w - <% end %> +<% end %> +endsnippet + +snippet ft "form_tag" w +<%= form_tag(${1:"${2:/users}"}, method: ${3::post}) %> + $0 + +endsnippet + +snippet lin "link" w +<%= link ${1:"${2:Submit}"}, to: ${3:"${4:/users}"}, method: ${5::delete}) %> endsnippet diff --git a/snippets/eelixir.snippets b/snippets/eelixir.snippets index 17855b4..f600c46 100644 --- a/snippets/eelixir.snippets +++ b/snippets/eelixir.snippets @@ -1,6 +1,16 @@ snippet % <% ${0} %> + snippet = - <%= ${1} %> + <%= ${0} %> + snippet end <% end %> + +snippet ft + <%= form_tag(${1:"/users"}, method: ${2::post}) %> + ${0} + + +snippet lin + <%= link "${1:Submit}", to: ${2:"/users"}, method: ${3::delete}) %>