Tabs vs spaces has always been a controversial topic. Thankfully, vim isn't biased in any way.
To convert spaces to tabs, execute the command `:set noexpandtab`, followed by `:retab!`.
Vice versa, you can convert tabs to spaces with the command sequence:
:set expandtab
:set tabstop=4
:set shiftwidth=4
:retab