How to stop Resharper from line breaking after return keyword for long lines?

前端 未结 2 1394
慢半拍i
慢半拍i 2020-12-09 15:11

When I auto format with Resharper CTRL + ALT + SHIFT + F for lines longer than max line length (in my case say it\'s 80 characters), I get the following:

            


        
2条回答
  •  臣服心动
    2020-12-09 16:03

    There is no special option to turn "wrapping after return" OFF.

    1) I was not able to reproduce a similar code formatting as shown in the first code snippet. However, I recommend you trying to change this setting to "Simple Wrap": ReSharper | Options | Code Editing | C# | Formatting Style | Line Breaks and Wrapping | Line Wrapping | Wrap invocation arguments.

    2) In my case, the following changing helps me: ReSharper | Options | Code Editing | C# | Formatting Style | Line Breaks and Wrapping | Line Wrapping | Wrap chained method calls | Select "Chop always".

提交回复
热议问题