Reputation: 66490
This is similar question as this How do I change indent in php-mode to 2 spaces in Emacs? but for javascript-mode, I've try the same
(setq c-basic-offset 2)
but it don't work.
Upvotes: 23
Views: 4937
Found this as well
(setq js-indent-level 2)
Upvotes: 39