Skip to content

Instantly share code, notes, and snippets.

@f3r
Last active October 15, 2015 02:24
Show Gist options
  • Save f3r/acaa2a3b697deefd51df to your computer and use it in GitHub Desktop.
Save f3r/acaa2a3b697deefd51df to your computer and use it in GitHub Desktop.
SublimeText3 | HTML,CSS,JS code formatter via node.js

Beautify Your Code in SublimeText3

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.

Installation

  1. Install node.js
  2. Open Sublime Text 3
  3. Install Sublime Package
  • Ctrl+Shift+P or Cmd+Shift+P in Linux/Windows/OS X
  • Type install, select Package Control: Install Package
  • Type prettify, select HTML-CSS-JS Prettify
  • Menubar: Sublime Settings -> Preferences -> Package Settings -> HTML/CSS/JS Prettify -> Set prettify preferences
  1. Update Package Configuration

How to Use

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment