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

我们两清 提交于 2019-11-28 08:55:20

Resharper -> Options -> (Code Editing) C# -> Formatting Style -> Line Breaks and Wrapping

There are a lot of settings for line wrapping. The default for Wrap long lines is normally 120 characters. This may be triggering your break since you are set to 80 or Resharper 8.0 may have a newer option for return. The path above is for 7.0, but I believe it is the same or at least similar to 8.0.

The nice is that they show you examples for the changes you make so you don't have to test it right away.

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".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!