How do I get vim to place the cursor within the braces starting on a new line, ie with | denoting the cursor position :
class { | }
right now
autoindent refers to it carrying over the current indentation level onto subsequent lines. To get it to indent according to syntax, you need to specify a flag like smartindent or cindent as well.
autoindent
smartindent
cindent