title: Sublime Text 3 Code autoformatting
body: <p>I've searched high and low, but I can't seem to find a plugin that makes Sublime work similar to how Visual Studio formats my code as I type it.</p>
  
  <p>For example, when <em>I</em> write a <code>for</code> loop, it looks something like this:</p>
  
  <pre><code>for(int i=0;i&lt;value.length;i++) {
      //loop body
  }
  </code></pre>
  
  <p>As soon as I complete the loop body, Visual Studio will format it to be much more readable:</p>
  
  <pre><code>for (int i = 0; i &lt; value.length; i++)
  {
      //loop body
  }
  </code></pre>
  
  <p>Basically, it's just adding spaces around operators in this case, but it does much more.  If I write horribly indented HTML/XML code, it corrects the indentation.  Arrays and multiline conditionals become much more readable.</p>
  
  <p>Are there any Sublime Text 3 plugins out there that do something similar to this?  Everybody seems to highly recommend the "Reindent" command, which works for the HTML/XML formatting, but it doesn't space everything out in a consistent way.  <a href="https://github.com/jdc0589/JsFormat" rel="noreferrer">JsParen</a> looks good, but it won't work for any other language that I use, namely PHP, and it's for ST2.</p>