> have to fix it up manually

Any editor written or actively maintained in the current century does this automatically for you. (Yes that obviously includes Emacs and Vim).

But that doesn't work if the indentation carries semantic meaning; you can't change the indentation without changing the meaning. Maybe you can correct syntactically-incorrect spacing (e.g. change 3 spaces to 4 spaces), but not much beyond that.