2

The thread " Is there an HTML auto-indentation feature or plugin for Sublime Text (aka prettify/beautify/format)? " refers to an HTML formatter for SublimeText.
Does anyone know of something equivalent for javascript?

At the very least it needs to:

  • fix indentation
  • remove extra white spaces
  • remove extra blank lines
Bachalo
  • 2,857

1 Answers1

2

If you install Package Control and then use its search function you can find plugins for just about anything.

In this case, I'd recommend using HTML-CSS-JS Prettify. Make sure you have node.js installed and in your path, and make sure you read through the setup instructions carefully to get everything up and running. Other options include JSFormat, which doesn't require node, and JavaScript Beautify, which uses the same library as JSFormat but for some reason requires you to install it yourself.

MattDMo
  • 5,409