So you already know to use spaces instead of tabs for indenting. But what about those files that already have them? Here’s how to untabify an entire file at once. Note that you’ll still have to align anything that is out of whack because of the old tabs, but at least they’ll be spaces now.
- Go to the start of the file:
- Start buffer selection:
- Mark the entire buffer:
- Convert tabs to spaces in the selected region:
You can do a partial region with this command too, just select a smaller region instead of the whole file.