Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReSharper and auto closing parentheses

Is there a way to avoid closing the following parentheses:

String.Format(), or Console.WriteLine() automatically?

Sometimes is this is annoying and unnecessary, and I end up pressing Delete to remove it.

I tried disabling Auto-insert pair brackets, pharentheses and quotes and Auto-insert closing brace and it is still not working...

like image 457
Oscar Mederos Avatar asked Mar 05 '11 03:03

Oscar Mederos


1 Answers

The following options should be unchecked/checked in Resharper if you do not want autocomplete feature on parenthesis (all options can be accessed through Visual Studio > ReSharper > Options... > Environment)

To disable parenthesis auto insert in non method calls (as pointed out in the question, you have already disabled it)

  • Editor > Auto-insert pair brackets, pharentheses and quotes (unchecked)
  • Editor > Auto-insert closing brace (unchecked)

To disable parenthesis auto insert in method calls

  • Intellisense > Completion Behavior > Automatically insert parenthesis after completion > Opening only (enabled)

    Automatically insert parenthesis after completion

Tested in Visual Studio 2008 with ReSharper 6.0.

like image 164
Devendra D. Chavan Avatar answered Oct 11 '22 14:10

Devendra D. Chavan