language-ruby icon indicating copy to clipboard operation
language-ruby copied to clipboard

case when, case # when and generic casing tabbing broken.

Open envygeeks opened this issue 11 years ago • 2 comments

Atom seems to always want to de-indent when in a case statement in Ruby. It was bad that it always broke the way I like to tab single-line whens but it got worse when I started commenting above the when statement it would then tab behind the case resulting in:

  case true

  # Comment
when arguments then do_work(son)
  end

It would be nice if language-ruby respected our custom tabbing and didn't try to enforce crazy rules, please, because I like my single line whens to look like:

case true
  when argument then do_work(son)
end

But editing always breaks the tabbing in some way especially when you start commenting.

envygeeks avatar Aug 06 '14 01:08 envygeeks

+1

ypresto avatar Nov 19 '15 12:11 ypresto

This is annoying when using case when for assignment and indents are not aligned to multiples of 2. e.g.

    status = case reason
             when :forbidden then 403
             when :not_found then 404
             end
             # 13 spaces

ypresto avatar Nov 19 '15 12:11 ypresto