UsePlugin 'detectindent' autocmd BufRead * DetectIndent let g:detectindent_preferred_indent = 4 let g:detectindent_preferred_expandtab = 1 let g:detectindent_preferred_when_mixed = 1