Visual Studio Code使用Microsoft出品的C/C++插件,借助Clang Format工具进行代码格式化。在设置(settings.json)中,可以自行修改代码格式化的样式,如:
{
"C_Cpp.clang_format_fallbackStyle": "{ BasedOnStyle: Google, IndentWidth: 4, TabWidth: 4, ColumnLimit: 120, PointerAlignment: Right, AccessModifierOffset: -2, DerivePointerAlignment: false, SpacesBeforeTrailingComments: 1 }"
}
标签:Code,格式化,代码,C++,Visual,Studio
From: https://www.cnblogs.com/fang-d/p/16760041.html