Disable auto insert curly braces in vscode

Is there a way to turn off auto closing curly braces insert in vscode? I went through the settings of the editor one by one and turned off everything that was related to formatting, but I did not see anything specifically for this.

For example, when I type something like

function() { 

vscode immediately adds } , so I end up with

 function() {} 

Then I press enter and it automatically backs off the cursor. I do not want this to be done. I do not want him to automatically insert any closing symbol or any indentations. I just want him to stop helping me, and let me print what I want to print. But I can not understand if there are any settings for this?

I’m probably the only person in the word who wants this β€œfeature”, so I won’t be surprised if this is impossible.

+32
visual-studio-code
source share
1 answer

[Cm. UPDATE below to change the options for this command.]

// Controls whether the editor should automatically close the brackets after they open

 "editor.autoClosingBrackets": false, 

You can also do this depending on the language using

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

Edit : a later version of vscode changed this to:

"editor.autoClosingBrackets": "never"

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

+43
source share

All Articles