简体   繁体   中英

How do i change the way visual studio code auto corrects curly braces?

I prefer my curly braces looking like this:

function eg()
{

}

But when I try to format my code, vscode auto corrects to this:

function eg() {

}

Is there any plugins that I can download or setting that I can tweak to change this?

Try :

"javascript.format.placeOpenBraceOnNewLineForFunctions": true;

"javascript.format.placeOpenBraceOnNewLineForControlBlocks": true;

"typescript.format.placeOpenBraceOnNewLineForControlBlocks": true;

"typescript.format.placeOpenBraceOnNewLineForFunctions": true;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM