What setting controls auto closing quote mark behavior in Visual Studio 2017?
It's 'automatic brace completion', via:
Menu Tools > Options > Text Editor > General > Automatic brace completion
Unfortunately there is no separate option to only apply this for quotes; when disabled you also don't have it for eg. braces, brackets, etc.
disable automatic curly brace or bracket insertion in vscode
A later version of vscode has changed this to:
"editor.autoClosingBrackets": "never"
You can also do this in a language-specific way by
"[javascript]": {
"editor.autoClosingBrackets": "never"
}
"always"
, "languageDefined"
, and "beforeWhitespace"
are the new additional options.
[Previous, now inaccurate, setting.]
// Controls if the editor should automatically close brackets after opening them
"editor.autoClosingBrackets": false,
Disable automatic parenthesis insertion in Visual Studio 2015
Uncheck the "Automatic brace completion" option. Go to menu Tools > Options, then
choose Text Editor > C/C++ > General.
When you type { ( [ " ' /*
it will not put the chars } ) ] " ' */
Visual Studio Code bracket auto completion
TL;DR: As of June 2019, it's not possible to disable only the overtyping part of the autocloseBrackets function. You can only disable auto
bracket closing altogether.
Some people suggest using the TabOut Extension for Visual Studio Code to tab out of quotes, brackets, etc.
Ok, so what I found out over at the VSC Github is this:
[...] This can be turned off via editor.autoClosingBrackets. The feature
consists of multiple parts:
one is that when ( is typed, the result is (|).
the other part that is hit here, is that when ) is typed and ) follows the cursor, ) will be overtyped.
The feature is implemented language agnostic and looks only locally at
the next character. It does not count brackets to determine if the
code is "bracket unbalanced".
(Source: https://github.com/Microsoft/vscode/issues/35799)
At the moment, it's not possible to fix this, without losing the auto
bracket closing feature. The above thread has since been closed. New one is here: https://github.com/Microsoft/vscode/issues/37315 , but no patch has come out yet.
Disable closing bracket swallowing?
I received a solution from github of vscode project.
It works for me. Edit your keybindings.json
add the text below:
{
"key": "]",
"command": "editor.action.insertSnippet",
"when": "editorTextFocus",
"args": {
"snippet": "]"
}
},
{
"key": "Shift+]",
"command": "editor.action.insertSnippet",
"when": "editorTextFocus",
"args": {
"snippet": "}"
}
},
{
"key": "Shift+0",
"command": "editor.action.insertSnippet",
"when": "editorTextFocus",
"args": {
"snippet": ")"
}
}
Notice: "Shift+0" for en keyboard (
, edit it for your keyboard layout.
Related Topics
Copy Files With Authentication in C#
Asp.Net Core - Swashbuckle Not Creating Swagger.Json File
How to Count Rows Within Entityframework Without Loading Contents
Lambda Where Id Does Not Exist in Another List
C# File.Delete, File Being Used by Another Process
Using Enum and | as Dictionary Key
Controlling Datetime Parameter Formatting in Webapi 2
Sorting String Values Without Using Any Method/Function
How to Combine Values of Several Lists into One in C#
How to Delete Records Between Two Dates in Bulk
How to Set Autoincrement Ids in Unit Test
C# Best Way to Run a Function Every Second, Timer VS Thread
C# SQL Server Stored Procedure Parameter Return List
How to Execute Process on Remote Machine, in C#
Check If Database Exists Before Creating
How to Remove Time Portion of Date in C# in Datetime Object Only