To turn on visual indicators of whitespace in Visual Studio, use the keyboard chord (Ctrl-R, Ctrl-W) (setting found in Tools > Environment > Options):

image

Instead of nothing:

image

You can now see:

image

By default, when I set the insertion point on line 12 and hit Enter, Visual Studio inserted spaces instead of tabs:

image

To turn this off, change the setting to Keep Tabs in Tools > Options > Text Editor > All Languages > Tabs:

image

image

You can also do Edit > Advanced > Tabify Selected Lines.

Now I won't commit ugly spaces.  And a reminder to review Sara Ford's blog more often.