vim replace tabs with spaces

set expandtab
set tabstop=2
set shiftwidth=2
:retab

(First three lines can go in .vimrc)

https://stackoverflow.com/questions/426963/replace-tab-with-spaces-in-vim#427004