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 ,找到此项后把√去掉
6.vscode存在自动更新版本的情况导致远程连不上,需要通过设置选项->输入update后将相关的选项关闭