Fork me on github

Visual Studio Code设置自己的C++代码风格

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 }"
}
posted @ 2022-10-07 16:46  fang-d  阅读(908)  评论(0编辑  收藏  举报