ERuby indenting

Tim Pope vim-ruby-devel at tpope.info
Thu Nov 9 14:02:41 EST 2006


On Thu, Nov 09, 2006 at 09:30:35AM +0100, Nikolai Weibull wrote:
> > I have gone ahead and implemented this.  Attached is a patch.
> 
> Ah, thanks.  :-)

Great, I take this you approve.  Doug and I were contemplating doing
another release in the next few days to show off the new
indent/eruby.vim.  I would be thrilled if this patch could make it in.
I can commit it and update the ChangeLog too if you'd like.

Here's a bit of code that illustrates two cases with incorrect
indenting if the current plugin has its way (try them out with gg=G).
The first is tricky and the second is downright pathological, but I
thought I'd share anyways.  I may investigate the first at a later
time.

class Hash

  class Foo; def bar; nil; end; end

  alias old_writer []= unless instance_methods.include?(:old_writer)

end

Cheers,
Tim


More information about the vim-ruby-devel mailing list