Only two spaces of indentation in JavaScript in RubyMine?

pupeno picture pupeno · Apr 4, 2011 · Viewed 8.1k times · Source

Is there a way to configure RubyMine 3.1 to only use two spaces to indent JavaScript?

Answer

Grant Thomas picture Grant Thomas · Apr 4, 2011

Which version of RubyMine are you using?

The JetBrains site of reference for v3.1 reads as follows:

Settings dialog -> Project settings -> Code style -> General -> Indent

Indent:

In this text box, specify the number of spaces (or tabs if the Use Tab Character check box is selected) to be inserted for each indent level.

As for altering this specifically for Javascript, I don't see a possible solution - or at least not an easy one. You might be able to configure these general settings per file type, however. But I'm no expert in this field.