Normally I configure my vi/vim with
to "expand tabs" (to spaces), using "tab stops" of four spaces and the "shift width" also to four spaces.
To apply these changes to an existing file which already contains tabs I'd just use a common ex substitute command: :% s/^V^I/ /g
Could you have typed >>? This would indent the current line further, and under certain settings (mostly related to softtabstop, shiftwidth, shiftround, etc.) could change a space into a tab.
Obviously u undoes the change, but << is the counterpart.
For correcting spaces vs. tabs after changing the appropriate settings, use :retab[!].