Insert the these four lines into .vimrc
set shiftwidth=4
set tabstop=4
set expandtab "replace tab with space
set smarttab "easy when you use backspace
set shiftwidth=4
set tabstop=4
set expandtab "replace tab with space
set smarttab "easy when you use backspace