Sublime Forum

Javascript array indentation problem

#1

I have the following in javascript:

function () {
  var x = [
  1, 
  2,
  3
  ];
}

I want it to look like this (add another level of indentation within arrays):

function () {
  var x = [
    1, 
    2,
    3
  ];
}

Is there a way to tweak the javascript mode settings to do that? I noticed that JSON mode already does it correctly.

0 Likes

#2
0 Likes

#3

Thank you!

I guess I didn’t type in the right Google search terms originally.

0 Likes