Pablo Fernandez
Pablo Fernandez

Reputation: 287680

Only two spaces of indentation in JavaScript in RubyMine?

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

Upvotes: 19

Views: 8649

Answers (3)

Hernan Velasquez
Hernan Velasquez

Reputation: 2820

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.

Upvotes: 2

Joe Susnick
Joe Susnick

Reputation: 6772

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.

Upvotes: 5

Grant Thomas
Grant Thomas

Reputation: 45058

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.

Upvotes: 32

Related Questions