#Using Emacs
Emacs comes with an untabify function:
untabifyis an interactive autoloaded compiled Lisp function intabify.el.
(untabify START END &optional ARG)Convert all tabs in region to multiple spaces, preserving columns. If called interactively with prefix
ARG, convert for the entire buffer.Called non-interactively, the region is specified by arguments
STARTandEND, rather than by the position of point and mark. The variabletab-widthcontrols the spacing of tab stops.
This can be used interactively in the normal way with M-x, or bound to a key sequence.