VS Code更换代码主题

背景

习惯使用非严格意义上的Google C++ Style,但是VS Code插件C/C++支持的clang-format中的Google C++ Style缩进是2,因此感受很不好。

解决办法

打开VS Code的设置,搜索Clang_format_fallback Style,添加下面这段话:

{ BasedOnStyle: Google, IndentWidth: 4, TabWidth: 4, ColumnLimit: 110, AccessModifierOffset: -4, AllowShortIfStatementsOnASingleLine: true, AllowShortLoopsOnASingleLine: true, AllowShortBlocksOnASingleLine: true, AllowShortCaseLabelsOnASingleLine: true }

在这里插入图片描述
最终效果大致为:
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/m0_46161993/article/details/111939468
今日推荐