Sep 24, 2019

modify formatting settings in Visual Studio Code

To change formatting preferences, in particular, to put leading brace on the same line, use the folling.

To modify code formatting settings in vsc,

search C_Cpp.clang_format_fallbackStyle

add the follwing to User tab

Change the default
from   Visual Studio
to       {BasedOnStyle: Google, IndentWidth: 4, ColumnLimit: 0, SpacesBeforeTrailingComments: 8}

I found this info at:
https://stackoverflow.com/questions/46111834/format-curly-braces-on-same-line-in-c-vscode

and  more at
https://medium.com/@zamhuang/vscode-how-to-customize-c-s-coding-style-in-vscode-ad16d87e93bf

No comments: