0

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?

user886596
  • 2,380
  • 5
  • 31
  • 53

1 Answers1

0

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.

Billy Chan
  • 24,625
  • 4
  • 52
  • 68
  • I tried to put a plain html div within `li`, it won't indent either. – Billy Chan Mar 29 '13 at 17:40
  • indenting worked fine for me, without the `|` (using vim-ruby plugin) – mihai Mar 30 '13 at 16:00