jcubic
jcubic

Reputation: 66490

How to set 2 spaces indent in javascript-mode in Emacs?

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

Answers (1)

jcubic
jcubic

Reputation: 66490

Found this as well

(setq js-indent-level 2)

Upvotes: 39

Related Questions