10.01.09 - 12:45pm
Every now and then I find myself in Visual Studio and I’m tempted to edit some source code (usually this happens in the middle of debugging something). Then alarm bells go off and I’m reminded of the pain of cleaning up my patches after visual studio has littered them with tabs and CRLF’s.
Turns out you can tell Visual Studio to stop doing that. Go to tool->options and expand the “Text editor” node and the “All Languages” node under that. Then select tabs under that. I set my indenting to “smart”, tab and indent size to 2 and (this is the key) enabled “Insert spaces”. Its the “Insert Spaces” option that tells VS to use spaces instead of tabs.