When I tried to indent my .erb file via gg=G, I got this:
<li>
<%= gravatar_for user, size: 52 %>
<%= link_to user.name, user %>
<% if current_user.admin? && !current_user?(user) %>
| <%= link_to "delete", user, method: :delete, data: { confirm: "You sure?" } %>
<% end %>
</li>
I've tried using vim-ruby, different eruby.vim files, to no avail. Does anyone have a eruby.vim indent file that actually works?
I tried it. If removing
|, or put|as a single line, everything works fine.I suggest you follow this practice to make it as a single line when mixed with eruby code, or not to use
|at all. Such thing is better to be CSS border.