标记区域不受自动格式设置规则的影响(Flag a region to not be affected by the auto formatting rules)

系统教程 行业动态 更新时间:2024-06-14 16:57:39
标记区域不受自动格式设置规则的影响(Flag a region to not be affected by the auto formatting rules)

我正在寻找一种方法来保持我的代码区域有一定数量的制表符缩进。 选项卡表示与其上方字段的关系。

public string Foo1 pubic string F1Bar1 public string Foo2 public string Foo3 public string F3Bar1 public string F3Bar2 public string F3B2Foobar1 public string Foo4

运行自动格式当然会对齐所有这些字符串,有没有办法标记这部分代码被自动格式化程序忽略。 保持缩进,而其余代码确实格式化?

(Resharper可供我使用)

I'm looking for a way to keep a region of my to code have a certain number of tab indents. The tabs are representing a relation to the field above it.

I.e.

public string Foo1 pubic string F1Bar1 public string Foo2 public string Foo3 public string F3Bar1 public string F3Bar2 public string F3B2Foobar1 public string Foo4

Running an auto format would of course align all these string, Is there a way to flag this part of code to be neglected by the auto formatter. keeping the indents while the rest of the code does get formatted?

(Resharper is Available for me)

最满意答案

无法在ReSharper 7.0或更早版本中执行此操作。 但您可以在此处投票支持此功能http://youtrack.jetbrains.com/issue/RSRP-9997 。

No way to do it in ReSharper 7.0 or earlier. But you can vote for this feature here http://youtrack.jetbrains.com/issue/RSRP-9997 .

更多推荐

本文发布于:2023-04-13 12:07:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/a1faff49fa001047192d3e9220d36804.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不受   标记   规则   区域   格式

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!