Is there a way to keep ReSharper from formatting a region of code

后端 未结 3 1865
天涯浪人
天涯浪人 2020-12-17 15:48

I use ReSharper\'s code cleanup all the time, but sometimes I have code formatted in a way that makes it easier to read than ReSharper\'s formatter makes it. Is there a way

相关标签:
3条回答
  • 2020-12-17 16:21

    Probably not, but you can try writing your own Resharper plugin

    0 讨论(0)
  • 2020-12-17 16:30

    I had a discussion with Resharper support about this, their answer:

    Thank you very much for this information! We will discuss if we can support such formatting style in one of the future versions.

    0 讨论(0)
  • 2020-12-17 16:31

    As of writing this, you can actually do it the other way around. I.e., format only a selected area of code. Just select the desired block, hit Alt+Enter and type Format Selection. Meanwhile Silent Code Cleanup still cleans up the whole file. I agree, that a comment-styled exclusion would be very nice.

    0 讨论(0)
提交回复
热议问题