Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable automatic parenthesis insertion in Visual Studio 2015

I'm struggling with making Visual Studio (C++) stop automatically inserting closing parentheses and brackets. With curly braces I could disable it. (with turning the setting "Automatic brace completion" off)

I deactivated IntelliSense to make sure that it and its settings are not the culprit and deactivated all settings that I thought could be related to this problem, but without success.

Example: when I write code it automatically results in this:

functionName(parameter));

since the closing parenthesis also doesn't get replaced by my typed parenthesis I end up with syntactically incorrect code that I have to manually fix by deleting one of the parentheses - which is very annoying.

Is there a possibilty to deactivate this "Feature" or activate the replacement of the closing parenthesis, which is common in other IDEs like IntelliJ and Eclipse?
Are there hidden settings that give more control over this kind of things?

Used Version: Microsoft Visual Studio Community 2015 Version 14.0.25431.01 Update 3

like image 689
Gnurr Avatar asked May 18 '17 13:05

Gnurr


2 Answers

Uncheck the "Automatic brace completion" option. Go to menu Tools > Options, then choose Text Editor > C/C++ > General.

enter image description here

When you type { ( [ " ' /* it will not put the chars } ) ] " ' */

like image 51
sergiol Avatar answered Oct 19 '22 20:10

sergiol


After starting Visual Studio in SafeMode the insertion problem went away, and the "Automatic brace completion" option behaved as sergiol described, pointing towards an external extension beeing the cause of the problem.
And indeed, after deactivating the EclipseKeymap extension, which I didn't remember having had installed, the problem was resolved.
Also, even with the automatic brace completion activated when I type the closing parenthesis it now gets replaced, as I am used to from other IDEs..

like image 21
Gnurr Avatar answered Oct 19 '22 20:10

Gnurr