disable automatic curly brace or bracket insertion in vscode

sstchur picture sstchur · Sep 28, 2017 · Viewed 19.7k times · Source

Is there a way to turn off automatic closing curly brace insertion in vscode? I've gone through the editor settings one by one and turned off everything that was related to formatting, but there was nothing I saw specifically for this.

For example, when I type something like

function()
{

vscode immediately adds } so that I end up with

function()
{}

Then, I press enter, and it has automatically indented the cursor. I don't want it to do any of that. I don't want it to auto insert any closing character or any indentations. I basically just want it to stop helping me and let me type the way I want to type. But I cannot figure out if there is any setting for this?

I'm probably the only person in the word who wants this "feature" so I won't be surprised if this isn't possible.

Answer

Mark picture Mark · Sep 28, 2017

[See EDIT below for changed options to this command.]

// Controls if the editor should automatically close brackets after opening them

"editor.autoClosingBrackets": false,

You can also do this in a language-specific way by

"[javascript]": {
    "editor.autoClosingBrackets": false
}

Edit: a later version of vscode has changed this to:

"editor.autoClosingBrackets": "never"

"always", "languageDefined", and "beforeWhitespace" are the new additional options. vscode curly braces settings