Change Indentation for Private Class Methods

已完成

Whenever I make a private class method, my code within the method is defaultly indented 10 spaces.

private def test_method
puts 'hello'
end

I think it's lining up two spaces into the def, but this just looks really weird.

I could probably add private above the method, but I'm afraid of accidentally making a method private.

Any thoughts how the spacing for this can be modified to indent two spaces beginning at private?

0

Hello Dylan,

what RubyMine version do you use? I checked it in 2017.1 EAP, looks fine (screenshot attached).



 

0

Hey Olga,

Doesn't seem to be working.

Is there something I need to change in my indentation settings?

RubyMine 2016.3.2
Build #RM-163.10154.57, built on January 19, 2017
JRE: 1.8.0_112-release-408-b6 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

0

Ah, found it! "Use indents relative to expression start" was checked under the Ruby Code Style.

0

请先登录再写评论。