Is there a way to configure RubyMine 3.1 to only use two spaces to indent JavaScript?
3 Answers
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.

- 44,454
- 10
- 85
- 129
-
4There are tabs for different languages in Project settings -> Code style -> General -> Tabs and Indents, including JavaScript. – Tim Down Apr 04 '11 at 15:13
Newer Answer:
on OSX Mavericks with RubyMine 6.3
File -> Default Settings -> Code Style -> JavaScript
The fact that this isn't under preferences is infuriating.

- 6,544
- 5
- 44
- 50
Updated answer from Joe:
On OSX Mavericks with RubyMine 7.1.2
File -> Default Settings -> Editor -> Code Style -> Javascript
And change the indentation settings in the 'Tab and Idents' tab.
It's pretty similar from the Joe's Answer, just adding the Editor option.

- 2,770
- 14
- 21