Add "set expandtab" to your .vimrc.

And also add the following two commands:

set tabstop=4

set shiftwidth=4

If you want to convert the existing tabs to spaces, please use :retab command.