How can I allow one line when and then statement.

Hello,

When I use `Reformat code` by default one line statement of `when` and `then` are become two lines like:

case str

  when 'a' then 1

  when 'b' then 2

  when 'c' then 3

end

to

case str

  when 'a' then

    1

  when 'b' then

    2

  when 'c' then

    3

end


Is there a way to configurate even if I use `Reformat code` let the `when` and `then` lines keep as it were?
I looked for in `Preferences`, but I couldn't find the setting for it.

Thanks.
3 comments
Comment actions Permalink

Hi,

I'd expect that "keep line break" setting (Settings|Editor|Code Style|Other) should control this, but it doesn't :(
So, I'd suggest to file a bug about it in our tracker (https://youtrack.jetbrains.com/issues/ruby)

Regards, Oleg.

0
Comment actions Permalink

Thanks! I'll report the issue.

0

Please sign in to leave a comment.