How to prevent auto-closing of curly braces in ReSharper?

≡放荡痞女 提交于 2019-12-04 02:44:54

问题


A simple question.

I'm trying out ReSharper and it closes my curly braces for me as soon as I open them. I really dislike this "feature" and I've had about three long looks through the settings window and I can't seem to figure out how to disable it! Am I missing an obvious check-box somewhere?

Edit:

The unchecking of "Auto close parenthesis after completion" does not do the trick!

I want to be able to type the following without } appearing for me:

if(true){

This doesn't seem like anything to do with intellisense completion.


回答1:


To turn off this behaviour, open the ReSharper options and on the Editor tab, untick the Auto-insert closing brace option. There should be no need to restart Visual Studio.




回答2:


FYI: I thought there was a bug in ReSharper until I realised Microsoft's "Productivity Power Tools" plugin also has an automatic brace completion option which is set to on by default.

To turn it off: Tools > Productivity Power Tools > Automatic Brace Completion > Off




回答3:


Go to ReSharper Options->Environment->Editor->Edit Behavior and disable "Auto-insert closing brace". Additionally, if this is a new Visual Studio install, newer versions also do this by default. You'll have to go to Options->Text Editor->C#->General and disable "Automatic brace completion."



来源:https://stackoverflow.com/questions/1587470/how-to-prevent-auto-closing-of-curly-braces-in-resharper

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