Add the 'smartindent' option to vim