Sublime Forum

How to format the code?

#1

For example:
for(var i=0;i<arr.length;i++)
How to change it into this format:
for ( var i = 0 ; i < arr.length ; i++)
Because the team needs the code to be neat and easy to modify,and i like to use Sublime.
Does sublime have this formatted shortcuts?
Anyone know?How?Ths.

0 Likes

#2

You probably want a plugin like JsFormat or EsFormatter.
The latter one requires Node.js.

0 Likes