Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can <strong>select all your code</strong> (<kbd>ctrl</kbd>+<kbd>A</kbd>) and use the in-app functionality, <strong>Reindent (Edit -> Line -> Reindent)</strong>. It will format your code with looking at the Sublime's tab/intent setting.</p> <p><strong>Alternatively:</strong> You can use <a href="https://github.com/jdc0589/JsFormat" rel="noreferrer"><strong>JsFormat</strong></a> 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.</p> <p><a href="https://github.com/jdc0589/JsFormat" rel="noreferrer">https://github.com/jdc0589/JsFormat</a></p> <p><strong>More info how to install JsFormat to your Sublime IDE:</strong> You can easily install JsFormat with using Package Control (Preferences -> Package Control) Open package control then type install, hit enter. Then type "js format" and hit <kbd>enter</kbd>, you're done. (The package controller will show the status of the installation with success and errors on the bottom left bar of Sublime)</p> <p><strong>Setting the short cut:</strong> Add the following line to your key bindings (Preferences -> Key Bindings User)</p> <pre><code>{ "keys": ["ctrl+alt+2"], "command": "js_format"} </code></pre> <p>I'm using <kbd>ctrl</kbd>+<kbd>alt</kbd>+<kbd>2</kbd>, you can change this short cut key whatever you want to. </p> <p><strong>My opinion:</strong> JsFormat is a good one, definitely worth to try it!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload