Whenever I add a tab in VS 2010, it puts spaces instead. I know you could fix this problem by going in the VS 2008 options, but I can't figure out how to fix this in VS 2010.
Asked
Active
Viewed 1.8k times
45
-
5I think you have reasons to want this. But there are reasons to use spaces instead. http://blog.nuclex-games.com/2013/02/why-you-should-indent-with-spaces/ – EdgarT Sep 04 '13 at 03:50
-
@EdgarT, do you have an updated link? The above one doesn't work. Thanks – Alex Aug 26 '19 at 16:02
2 Answers
82
Tools > Options > Text Editor > All Languages > Tabs > enable "Keep Tabs".
You can also adjust this setting on a per-language basis.

JYelton
- 35,664
- 27
- 132
- 191
-
2thx. I just realized that I had to click on the "show all settings" check box... noob error... but thanks – Jello Aug 17 '11 at 22:13
-
2
-
2
-
4
-
1
-4
Regarding the first anwser ... "Keep Tabs" will only work until you start using linq queries. When visual studio formats linq queries adds some spaces for paddind.
There are no built-in support in vs2010 for strict indentation using tabs.

jjavier
- 71
- 2