title: Vim and indentation with brackets/braces
body: <p>When editing JavaScript, I usually have to do this:</p>
  
  <pre><code>function myFunc() {
    // func body here
  }
  </code></pre>
  
  <p>I've tried a few bracket-closing plugins like AutoClose and vrackets, but when I come to code like above, they all do this:</p>
  
  <pre><code>function myFunc() {&lt;CR&gt;
  |}
  </code></pre>
  
  <p>How can I make Vim insert a  before the bracket when I go to new line, and indent the cursor properly like so:</p>
  
  <pre><code>function myFunc() {&lt;CR&gt;
    |&lt;CR&gt;
  }
  </code></pre>
  
  <p>Is there like a plugin or something that does this?</p>