I like to use spaces instead of tabs so I have this line in my .vimrc file:

set expandtab

This line will write spaces instead of tabs every time I hit the tab key.

Lately I’ve been working a little with Go. The standard in Go is to use tabs instead of spaces so I needed to change this preference for Go projects. The only thing that I needed to do is to add this line to my project .vimrc file:

set expandtab!
[ productivity  vim  ]
Spell and Grammar checking on vim vim productivity
Setting the search directory for Ctrlp vim plugin productivity vim
Adjusting the width of Nerdtree navigator productivity vim
Temporarily disable Syntastic on Vim productivity vim
Quick Vim setup vim productivity