Tab to space conversion

See commit messages.
It also means that the preferneces are ignored until the editor is reopen?