carl
carl

Reputation: 4406

sublime automatically add line breaks and indents

Is there a way to automatically reformat javascript code with sublime? E.g. if I get code like this

https://checkout.stripe.com/checkout.js

How can I copy this into sublime and automatically make it readable?

Upvotes: 1

Views: 998

Answers (2)

MattDMo
MattDMo

Reputation: 102842

There are several Javascript formatters available in Package Control. For un-minifying JS, I either use HTML-CSS-JS Prettify or JsFormat, or both. Please note that HTML-CSS-JS Prettify requires Node.js on your system, while JsFormat is a standalone program. JsFormat is the suggested replacement for the tool you found at https://beautifier.io, which uses js-beautify - see here.

Upvotes: 2

carl
carl

Reputation: 4406

I just found

https://beautifier.io/

which solved my problem... sublime should provide such a tool

Upvotes: 0

Related Questions