There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Razor code formatting is broken when using tabs in VS2012 MVC 4
When using "Keep tabs" instead of the default "Insert spaces", and running "Fomat document" (CTRL-E, CTRL-D) on in a .cshtml file with razor code any ifs inside other markup gets "mangled". I've attached a screenshot with a comparison of space and tab formatting.
In Visual Studio 2012 (I'm using premium), create a new ASP.NET MVC 4 project (using the default web site template).
Open "Tools"->"Options"->"Text Editor"->"All Languages"->"Tabs" and set "Keep tabs" instead of "Insert spaces".
Open any view (.cshtml) and insert:
Run format document (CTRL-E, CTRL-D).