1.打开vscode设置后
2. 搜索format
3. 把以下选项打上对勾
Editor: Format On Paste
Editor: Format On Save
Editor: Format On Type
4.C_Cpp:这一选项选择以下 Clang_format_fallback Style
并输入以下内容
{ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Linux, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 120}
5.不想预览模式,可以在设置中搜索 workbench.editor.enablePreview ,找到此项后把√去掉
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)