I spend way too much time fumbling around because Vim doesn\'t handle closing braces like most IDEs do. Here\'s what I want to happen:
Type this:
In VimL, you can map the { to do exactly as you wish:
{
inoremap { {}ko
depending on your autoindent setup, you may want to add a after .
For a more complete solution, I'd suggest you take a look at Luc Hermitte's vim plugins. They've never failed me so far.