ReSharper and auto closing parentheses

Oscar Mederos picture Oscar Mederos · Mar 5, 2011 · Viewed 9.7k times · Source

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

Answer

Devendra D. Chavan picture Devendra D. Chavan · Sep 10, 2011

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.