The following command will substitute all tabs in a file with four blank spaces:
In order to run this command whenever I open a new file I included it in my .vimrc by adding:
autocmd BufNewFile * exec "%s/\t/ /g"
However this didn't work. Does anyone know why?