HTML-CSS-JS Prettify is a SublimeText3 package that will help you automatically indent and format your HTML, CSS, JavaScript and Json files with one click.
- Install node.js
- Open Sublime Text 3
- Install Sublime Package
Ctrl+Shift+P
orCmd+Shift+P
in Linux/Windows/OS X- Type
install
, selectPackage Control: Install Package
- Type
prettify
, selectHTML-CSS-JS Prettify
- Menubar:
Sublime Settings
->Preferences
->Package Settings
->HTML/CSS/JS Prettify
->Set prettify preferences
- Update Package Configuration
- Replace your
.jsbeautifyrc
config file with the wdi-jsbeautifyrc
Once you have a html
, css
or js
file open, you can make automatically indent and format them by running:
Ctrl+Shift+H
(Linux)Cmd+Shift+H
(Mac)
Note: You shouldn't run it on minimized files(
__.min.js
|__.min.css
) or in libraries you’ve added (ie. bootstrap, jquery)