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...
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)
Tested in Visual Studio 2008
with ReSharper 6.0
.
In Resharper 9.2, I had the same items unchecked as given in Devendra's answer, but still experienced lag when typing parentheses and brackets.
I found that these issues went away by setting Do not complete on
values as found in Resharper >> Options > Environment > IntelliSense > Completing Characters. In the Dialog pane that appears, I set the Do not complete on
field to (){}.
for C# and JavaScript.
来源:https://stackoverflow.com/questions/5201429/resharper-and-auto-closing-parentheses