1

The following command will substitute all tabs in a file with four blank spaces:

%s/\t/    /g

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?

swimfar
  • 13
  • 3
scrapy
  • 91
  • 1
  • 6

1 Answers1

1
autocmd BufRead  *   exec "%s/\t/    /g"
scrapy
  • 91
  • 1
  • 6