To convert existing tabs to spaces, press Edit->Blank Operations->TAB to Space.
If in the future you want to enter spaces instead of tab when you press tab key:
Go to Settings->Preferences...->Language (since version 7.1) or Settings->Preferences...->Tab Settings (previous versions)
Check Replace by space
https://stackoverflow.com/questions/455037/convert...