Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 245
joshcomley Avatar asked Oct 19 '09 08:10

joshcomley


3 Answers

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.

like image 95
adrianbanks Avatar answered Oct 06 '22 03:10

adrianbanks


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

like image 36
Lee Smith Avatar answered Oct 06 '22 03:10

Lee Smith


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

like image 32
Eagle-Eye Avatar answered Oct 06 '22 01:10

Eagle-Eye