

(The package controller will show the status of the installation with success and errors on the bottom left bar of Sublime)Īdd the following line to your key bindings ( Preferences -> Key Bindings User) Then type js format and hit enter, you’re done.
Sublime text auto indent install#
You can easily install JsFormat with using Package Control ( Preferences -> Package Control) Open package control then type install, hit enter.
Sublime text auto indent how to#
You can select all your code( ctrl + A) and use the in-app functionality, reindent( Edit -> Line -> Reindent) or you can use JsFormat formatting plugin for Sublime Text 2 if you would like to have more customizable settings on how to format your code to addition to the Sublime Text’s default tab/indent settings. Lots of great features, not much to complain about.Īltough the question is for HTML, I would also additionally like to give info about how to auto-format your Javascript code for Sublime Text 2

HTML-CSS-JS Prettify is the winner in my book. Requires PHP (falls back to web service).Can’t handle minified HTML, lines with multiple open tags.If you want remove the tab spaces should select the text and press shift+tab. Hope this helps For that you must select the n lines of the code and press the key tab. Ships with Sublime, so no plugin install needed How do I indent multiple lines in Sublime Text Windows + OS X: Simply hold down the mousewheel and move your mouse up and and down to select the columns.I’ve tested each of the most popular plugins (see the writeup I did on my blog for full details), but here’s a quick overview of some of the most popular options: Reindent command There are half a dozen or so ways to format HTML in Sublime.
