If the .vimrc file already exist under your home directory, then open it. If not, new a file named .vimrc on your home directory and then open it. Paste the following lines into the .vimrc file and save it.
filetype plugin indent on
set tabstop=4
set shiftwidth=4
set expandtab
set autoindent