eRuby indenting capabilities
vim-ruby-devel at tpope.info
Mon Dec 4 12:05:41 EST 2006
On Tue, Dec 05, 2006 at 02:00:17AM +1100, Doug Kearns wrote:
> I was just giving the new indent script a quick test drive prior to the
> next release and noticed that the following example doesn't work as I'd
> if true
> is indented as:
> if true
First, the end block should of course be
This is what I get. Do your results differ or was this a copy and
> It also appears that the Ruby code will only be indented correctly when
> the <%,%> delimiters are on lines by themselves?
> eg. the following isn't transformed at all when running the
> filter/indent motion over it.
> <% if true
> end %>
> Am I misunderstanding its current capabilities?
Pretty much :). I've supported the most common conventions. For
example, your first example would work fine if written as
<% if true %>
<% end %>
It would of course be ideal to support your examples as well but
implementing them would require some heavy modifications to
indent/ruby.vim (and perhaps indent/html.vim as well). Since they
are apparently quite rare in the code I've worked with, I'm cheerfully
refraining from the task.
More information about the vim-ruby-devel