mattn / emmet-vim

emmet for vim: http://emmet.io/

Home Page:http://mattn.github.io/emmet-vim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom snippet for erb doesn't indent end tag properly

coaxial opened this issue · comments

commented

I'm creating a custom snippet for erb tags:

<%= ... %>
  ...
<% end %

~/.snippets_custom.json:

{
  "eruby": {
    "extends": "html",
    "snippets": {
      "erb": "<%= | %>\n\t${child}<% end %>"
    }
  }
}

And when doing div>erb>p, the output is:

<div>
  <%=  %>
    <p></p>
    <% end %>
</div>

Note how the <% end %> is indented one level too much, and doesn't match the json file.

If I add \n after ${child}, so ...${child}\n<% end %>, then the indent is correct but there is obviously an extra, unneeded line before the end tag.