 <p>You need <code>&lt;bar&gt;</code> (<code>|</code>) between each command, and you can join the <code>set</code>s together: </p> <pre><code>au BufNewFile,BufRead *.py,*.pyw,*.c,*.h,*.pyx match BadWhitespace /\s\+$/ | \ setlocal tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab autoindent \ textwidth=79 fileformat=unix set encoding=utf-8 </code></pre> <p>You can show trailing whitespaces with the listchars <code>trail</code>:</p> <pre><code>set listchars+=trail:- </code></pre>