eRuby indenting capabilities
Doug Kearns
dougkearns at gmail.com
Mon Dec 4 13:37:48 EST 2006
On Mon, Dec 04, 2006 at 11:05:41AM -0600, Tim Pope wrote:
> On Tue, Dec 05, 2006 at 02:00:17AM +1100, Doug Kearns wrote:
> > Tim,
> >
> > 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
> > expect.
> >
> > <%
> > if true
> > %>
> > foobar
> > <%
> > end
> > %>
> >
> > is indented as:
> >
> > <%
> > if true
> > %>
> > foobar
> > <%
> > end
> > %>
>
> First, the end block should of course be
>
> <%
> end
> %>
>
> This is what I get. Do your results differ or was this a copy and
> paste error?
No, I'm seeing 2 indent levels for the "end" and one for the "%>". In
fact, if I repeatedly indent this the final "%>" alternates between 1
and 0 levels of indent.
<snip>
> 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.
Fair enough...just checking. ;-)
Thanks,
Doug
More information about the vim-ruby-devel
mailing list