Is there an option in ReSharper to add a blank line after a closing bracket

只愿长相守 提交于 2019-12-23 06:56:15

问题


I would like to add a blank line after a closing bracket inside of a method. I cannot find a setting for this. Here is some sample code.

What I have:

if (something != null) {
    something = 1;
}    
var andThen = 2;

What I want:

if (something != null) {
    something = 1;
}

var andThen = 2;

edit: I have version 8.1.23.546.


回答1:


I just wanted to comment that this will be fixed in version 2017.3 of R# and that it is already fixed in R# 2017.3 EAP 7 which can be downloaded from here.

Updated C# Formatting Style options for blank lines before and after statements with blocks, control transfer as well as multiline statements.

This can be configured in the R# options under Formatting Style => Blank Lines => Before/After statements with child blocks.




回答2:


No, that is not possible in ReSharper, at least not in version 7.0.1.

There is nothing of the kind in Formatting Style -> Braces Layout, nothing in Formatting Style -> Blank Lines and nothing in Formatting Style -> Line Breaks and Wrapping.



来源:https://stackoverflow.com/questions/22175548/is-there-an-option-in-resharper-to-add-a-blank-line-after-a-closing-bracket

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