Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

disable automatic curly brace or bracket insertion in vscode

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.

like image 380
sstchur Avatar asked Sep 28 '17 13:09

sstchur


People also ask

How do I get out of bracket in VSCode?

As in, when you press "tab" key near a closing bracket, the cursor will jump over it instead of adding a new tab.

How do I turn off autoformat in VSCode?

Enable/Disable Format On SaveOpen up VSCode Command Palette by pressing Ctrl + Shift + P. Search and select Open Settings (UI). Just start typing and it will auto-fill. Once there's a match, you can hit enter immediately, or manually click on the right option.


1 Answers

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. vscode curly braces settings


[Previous, now inaccurate, setting.]

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

"editor.autoClosingBrackets": false, 
like image 191
Mark Avatar answered Oct 19 '22 01:10

Mark