Reformat issue (do not use blank after and before symbols like '[' '(' ')' ']')

Hello guys

We just opened Rubymine 3 IDE for our project. And have some reformat issue.
We have code style rule, which I can't find to turn on.

Code style rule: Do not use blanks after '{', '(', '[' and before ']', ')', '}'.

Example: [1, 2, 3].each{|number| puts number}
Rubymine default reformat code: [1, 2, 3].each { |number| puts number }

Could you help me please, how to take this code style rule into IDE?

4 comments
Comment actions Permalink

Hello Kirill,

There is a formatting option for this, you should turn off the option: File | Settings | Code Style | Ruby | Spaces around curly braces.

Regards,
Oleg

0
Comment actions Permalink

Hello Oleg

Yes, I find this category "Code style -> Ruby", but I can't find this option "Spaces around curly braces"

Rubymine 3.0.1
#RM-97.133

Maybe this option in developing version of Rubymine?

Also thank you, Oleg, for fast answer.

Regards,
Kirill



Attachment(s):
Screenshot_1.png
0
Comment actions Permalink

Yep, just forgot to mention that this is available in RubyMine 3.1 EAP builds. Read more about EAP build at: http://blogs.jetbrains.com/ruby/2011/01/introducing-rubymine-3-1-early-access-build-102-217/

Regards,
Oleg

0
Comment actions Permalink

Oh, sorry. I also forgot about EAP builds.
Thank you.

Regards,
Kirill

0

Please sign in to leave a comment.