How do I set up VSCode to put curly braces on a new line in C# and C++ while typing?

烈酒焚心 提交于 2020-01-25 10:18:06

问题


I want VS Code to put curly braces on a new line in C# and C++

How it works now

How it should look

Tried C# FixFormat extension, but it works only after I push CTRL+K+F but I want VS Code to make curly braces on new lines while I'm coding, without additional steps like hotkeys and such


回答1:


On VSCode, Go to File\Preferences\Settings and search for 'curly'. Enable all four typescripts as given in the image.




回答2:


From Preferences/Settings, choose c# FixFormat and uncheck the checkbox (Braces: On Same Line).



来源:https://stackoverflow.com/questions/56934072/how-do-i-set-up-vscode-to-put-curly-braces-on-a-new-line-in-c-sharp-and-c-whil

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!