c# - visual - rider format code




How can I get VisualStudio 2010 with ReSharper to preserve my spaces between '<%:', content, and '%>'? (2)

I've had some success with the Solution-based settings...

ReSharper -> Options -> Languages -> C# -> Formatting Style -> Spaces

There is no equivalent section for ASP.Net or HTML, but it seems to take some from the actual code language your asp.net pages are written in... so try the C# section.

I have Visual Studio 2010 and ReSharper installed and after looking for about an hour, I can't find this formatting setting anywhere.

I'd like it to look like this:

<div><%: Model.Something %></div>

and it keeps removing my space between Model.Something and %> to look like this:

<div><%: Model.Something%></div>

This behavior would be fixed in the next EAP of ReSharper 6.1, maybe even in beta. Sorry, had no time for an option - for 6.1 there would be spaces always, hopefully most of ASP.NET developers would like it that way.

P.S. In older versions you can switch it via option ReSharper | Options | Languages | C# | Formatting Style | Spaces -> Within parentheses -> Method call parentheses. But switching it also affects C# method calls.







resharper