Resharper 5: How do I set the default formatting style for inline code blocks?

Posted by nukefusion on Stack Overflow See other posts from Stack Overflow or by nukefusion
Published on 2010-04-21T12:16:21Z Indexed on 2010/04/21 12:33 UTC
Read the original article Hit count: 200

Filed under:
|
|
|

I've got a problem with the formatting of inline code blocks within the VS2010 text editor and wonder if anyone else has had similar problems and found the 'magic' setting I'm looking for.

I'm working my way through tutorials in an MVC book. Whenever I add some inline code blocks to a view I want them formatted like so:

<% foreach (var link in Model) { %>
   <a href="<%=Url.RouteUrl(link.RouteValues)%>">
      <%=link.Text%>
   </a>
<% } %>

What I'm actually getting is this (auto-formatted by the IDE when I finish writing the code):

<% foreach (var link in Model) { 
     %>
   <a href="<%=Url.RouteUrl(link.RouteValues)%>">
       <%=link.Text%>
   </a>
<% }
     %>

It's pretty irritating. Any ideas on how I can instruct the IDE to leave my <% %> tags alone? I've been fiddling with options under "Tools -> Options -> Text Editor" for ages but alas am getting nowhere...

Edit: I've just noticed that this is down to Resharper 5 (when I disable it the problem disappears), however I still don't know how to stop it. Any ideas?

© Stack Overflow or respective owner

Related posts about mvc

Related posts about asp.net-mvc