title: Vim Auto Indent with newline
body: <p>How do I get vim to place the cursor within the braces starting on a new line, ie with | denoting the cursor position :</p>
  
  <pre><code>class {
    |
  }
  </code></pre>
  
  <p>right now with my settings it only does this</p>
  
  <pre><code>class {
  |}
  </code></pre>
  
  <p>I got this in my .vimrc file
  set autoindent shiftwidth=2 tabstop=2 noexpandtab</p>
  
  <p>Basically I just want how a normal IDE would indent it.</p>
  
  <p>update:</p>
  
  <p>I found how to do this with <code>inoremap { {&lt;CR&gt;}&lt;Esc&gt;O</code></p>