" Python specific settings. setlocal list setlocal tabstop=4 setlocal shiftwidth=4 setlocal expandtab setlocal autoindent setlocal formatoptions=croql nmap :w :!clear; python % nmap :w :!python % " set foldmethod=indent let python_highlight_all=1 " Use the below highlight group when displaying bad whitespace is desired. highlight BadWhitespace ctermbg=red guibg=red " Display tabs at the beginning of a line in Python mode as bad. au BufRead,BufNewFile *.py,*.pyw match BadWhitespace /^\t\+/ " Make trailing whitespace be flagged as bad. au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/