Javascript Beautifier Plugin with Sublime 2
Share
Javascript Beautifier Plugin with Sublime 2 uses the the JavaScript formatting python module from jsbeautifier.org. The plugin is pretty basic at the moment, doesnt check to make sure you are in a .js file, it just formats the selected text, or the entire file if there is no selection.
More posts on Sublime 2:
- How to Setup Sublime 2 Text Editor
- Sublime2 vs Notepad++
- Mapping a new tab command in Sublime 2 Text
Code Before
Select your code and the execute the command
Full instructions below.
Code After
Setup Instructions
- Download the sublime format plugin from GitHub.
- Type %appdata% in cmd (start>run) and extract the folder renamed to “JsFormat“.
- Reload Sublime 2
- Select the JavaScript you want to make pretty.
- Press CTRL+SHIFT+P (or Tools>Command Pallet) and select Format as the command.
- You should now have pretty JavaScript!