Hi Guys,
I tried everything I could find online , but nothing works.
I want curly braces to be placed on the next line after function declaration.
By Default it keeps one on the same line.
Thank you
Hi Guys,
I tried everything I could find online , but nothing works.
I want curly braces to be placed on the next line after function declaration.
By Default it keeps one on the same line.
Thank you
What did you try? This should all simply be a matter of setting your formatting preferences:
Also note that Visual Studio will only apply the formatting rules at certain times. I use an extension called Format on Save, which applies the formatting rules any time a file is saved. But you can also apply the formatting rules by choosing Edit → Advanced → Format Document
Hi @[dgoyette]( VSCode Formatting members/dgoyette.1147741/),
Thank you for your comment, but I was wondering how to do it Visual Studio Code.
Hi @Artpen
Have you tried this: Select some part of code or all code (Ctrl+A) and then do Ctrl+K, F - this will do automatic formatting. I can’t remember if I’ve changed some setting years ago but at least for me brackets are placed on their own lines, not JavaScript style.
Hi @eses ,
Thank you it is what I ended up doing, manually formatting:)
But every new file have to do it again unfortunately.
This extension allows you to change it:
https://marketplace.visualstudio.com/items?itemName=ryannaddy.vscode-format
Thank you it works!
And of course 404 … of course…