Indentation in vim and neovim
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=2
:set shiftwidth=2
:retab