如何使用 ReSharper 获取 VisualStudio 2010 以保留 '<%:'、内容和 '%>' 之间的空格?
我安装了 Visual Studio 2010 和 ReSharper,查找了大约一个小时后,我在任何地方都找不到此格式设置。
我希望它看起来像这样:
<div><%: Model.Something %></div>
它不断删除 Model.Something
和 %>
之间的空间,看起来像这样:
<div><%: Model.Something%></div>
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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此行为将在 ReSharper 6.1 的下一个 EAP 中得到修复,甚至可能在测试版中得到修复。抱歉,没有时间选择 - 对于 6.1,总会有空格,希望大多数 ASP.NET 开发人员会喜欢这种方式。
PS 在旧版本中,您可以通过选项 ReSharper | 进行切换。选项|语言 | C# |格式样式 |空格 ->括号内 ->方法调用括号。但切换它也会影响 C# 方法调用。
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 ->选项->语言 -> C#->格式样式 ->空格
对于 ASP.Net 或 HTML 没有等效的部分,但它似乎从编写 ASP.Net 页面的实际代码语言中提取了一些内容......所以请尝试 C# 部分。
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.