Search code examples
visual-studiovisual-studio-2019

How to turn off double quotes auto-completion in Visual Studio 2019 for C++ editor?


After updating to version 16.1 of Visual Studio 2019, the code editor for C++ completes double quotation characters. When I type one double quote " it automatically completes it as "".

How to turn this feature off? I tried to look into settings, but could not find in C++ Editors settings or All Languages settings.

Update: it actually only completes when I type wide string literal starting with L. For example, when I type L" it auto-completes it to L""

Update 2: it happens for some .cpp files but not for others. I currently do not see any pattern. Seems like a bug.


Solution

  • Update October 2019: it is fixed now starting from version 16.3.2. If not, then check your settings carefully.

    Short version: This is a bug in Visual Studio, and hopefully will be fixed. You can up-vote it here.

    Longer version: I decided to report this bug to Visual Studio Team, but someone already did that. So if you are affected by this issue, consider up-voting it.

    Link to VS bug tracker: Brace completion when member list is up does not put the character in the right position

    Note, that while title of above bug may sound like only Code Analysis is affected, VS Team have marked another - more relevant bug as a duplicate to the above bug (C++ automatic quote completion). And it is not possible to vote closed bug, so only option is to vote the first one I mentioned.