I am running the latest version of Visual Studio 2019. I have changed my C++ code to use K&R style braces by going to Tools > Options > Text Editor > C/C++ > Code Style > Formatting > New Lines and changing all the options to Keep on same line, but add a space before. The issue is that when I do this code snippets no longer work correctly, for example:
Normally when using Allman style braces the if code snippet would look like this:
if (true)
{
}
What I expected it to look like when using K&R style braces was this:
if (true) {
}
But what it actually looked like was this:
if (true) {
}
This is very annoying as whenever I use a code snippet to complete an if statement, for loop or anything else I have to waste time removing the extra characters it inserts. Any help would be appreciated :)