ERuby indenting

Nikolai Weibull now at
Wed Nov 8 16:31:10 EST 2006

On 11/8/06, Tim Pope <vim-ruby-devel at> wrote:
> Hi, thanks for the response, and your work on indent/ruby.vim!

No problem :-).

> On Wed, Nov 08, 2006 at 02:54:38PM +0100, Nikolai Weibull wrote:
> > Perhaps the regular expressions used in indent/ruby.vim should be made
> > available to the indent/eruby.vim script as well, to avoid
> > duplication.
> This sounds like a good idea.  At the same time, it seems like more
> trouble than it's worth.  There are only a couple of patterns
> eruby.vim uses, and they don't directly match up with the patterns in
> ruby.vim.  You'd need to factor out the differences and complicating
> matters this way doesn't seem prudent for a couple of short patterns
> that are rather unlikely to change.  If eruby.vim becomes more
> sophisticated this is definitely worth considering.

Sounds like your right.

> I have a couple of questions regarding your indent/ruby.vim myself.
> Are you particularly attached to the method of lining up parentheses?

?  Do you mean as in

def some_method(param1,

or what?  Writing

def some_method(param1,

is bugged though, because it's assumed that the ) closes something.
This is stupid, though, and the ) shouldn't be considered special.
I'll check what's causing this some day or other.

> I have altered my local copy to make it possible to disable
> (g:rubyindent_match_parentheses) and instead use the brace/bracket
> behavior.  Given that the indent doesn't restore properly on the line
> after the closing parenthesis, I'd be quite satisfied to just see the
> behavior eliminated altogether.  I could furnish a patch for this as
> well (or just alter and commit directly) if you are open to it.

Please show the problem and the solution.

> On a related note, ) and ] probably belong in indentkeys.

They already are.


More information about the vim-ruby-devel mailing list