Indenting bug: }

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Indenting bug: }

Gavin Sinclair
*** Forwarded from comp.lang.ruby (message by Vincent Foley) by Gavin
Sinclair ***

A few months ago, I posted a message in which I said I found a bug in
Vim's Ruby indenting.  I tried the version from October 7th today, and
the bug I had reported has been fixed.  However, I uncovered a new one:
blocks in arrays.

The following code (indented in Emacs)
arr = [
  MyClass.new { |x|
    x.some_method
  },

  MyClass.new { |x|
    x.some_other_method
  }
]

Is indented like this in vim:
arr = [
  MyClass.new { |x|
  x.some_method

},

  MyClass.new { |x|
  x.some_other_method
}

]

I know full well that vim script is a horrible language and that
getting indenting right must be a very hard task, but I hope someone
with enough knowledge of Vim can fix this issue.

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: Indenting bug: }

Nikolai Weibull-11
On 4/9/06, Gavin Sinclair <[hidden email]> wrote:
[indentation bug]
> I know full well that vim script is a horrible language and that
> getting indenting right must be a very hard task, but I hope someone
> with enough knowledge of Vim can fix this issue.

I'm certainly not the one, sorry.  I don't have time to fix this at
the moment, and I'd say that it is rare enough to not warrant extra
effort to fix it; although anyone is free to try.

  nikolai

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: Indenting bug: }

Nikolai Weibull-11
On 4/9/06, Nikolai Weibull <[hidden email]> wrote:
> On 4/9/06, Gavin Sinclair <[hidden email]> wrote:
> [indentation bug]
> > I know full well that vim script is a horrible language and that
> > getting indenting right must be a very hard task, but I hope someone
> > with enough knowledge of Vim can fix this issue.
>
> I'm certainly not the one, sorry.  I don't have time to fix this at
> the moment, and I'd say that it is rare enough to not warrant extra
> effort to fix it; although anyone is free to try.

Actually, if I find the time, I might rewrite it, modelling it after
the code in ruby-mode.el.  Then people can't say "but it works in
Emacs...".

  nikolai

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: Indenting bug: }

Doug Kearns
On Wed, Apr 19, 2006 at 11:16:39PM +0200, Nikolai Weibull wrote:

> On 4/9/06, Nikolai Weibull <[hidden email]> wrote:
> > On 4/9/06, Gavin Sinclair <[hidden email]> wrote:
> > [indentation bug]
> > > I know full well that vim script is a horrible language and that
> > > getting indenting right must be a very hard task, but I hope someone
> > > with enough knowledge of Vim can fix this issue.
> >
> > I'm certainly not the one, sorry.  I don't have time to fix this at
> > the moment, and I'd say that it is rare enough to not warrant extra
> > effort to fix it; although anyone is free to try.
>
> Actually, if I find the time, I might rewrite it, modelling it after
> the code in ruby-mode.el.  Then people can't say "but it works in
> Emacs...".

But then the Emacs users will be less likely to annoy everyone with "but
it works in Vim".

Regards,
Doug
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel