File --> Preference --> setting --> 搜索 clang_format --> 在C_Cpp:Clang_format_fallback Style的输入窗中填入如下代码风格之一:
Visual Studio LLVM,Google,Chromuim, Mozilla, WebKit
或者:
{ BasedOnStyle: LLVM, IndentWidth: 4 }
//IndentWidth是缩进值,可自定义,默认为2
本文介绍如何在VSCode中配置C/C++代码的格式化设置,包括使用clang_format工具,选择不同的代码风格如Visual Studio, Google, Chromium等,以及自定义缩进值。
File --> Preference --> setting --> 搜索 clang_format --> 在C_Cpp:Clang_format_fallback Style的输入窗中填入如下代码风格之一:
Visual Studio LLVM,Google,Chromuim, Mozilla, WebKit
或者:
{ BasedOnStyle: LLVM, IndentWidth: 4 }
//IndentWidth是缩进值,可自定义,默认为2
转载于:https://www.cnblogs.com/xiangsui/p/11488794.html

被折叠的 条评论
为什么被折叠?