vscode设置cpp自动格式化 0x01 c++ 自动格式配置

简介——————————————-

个人配置文件:

{
    "python.pythonPath": "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64",
    "python.linting.pylintEnabled": false,
    "python.linting.flake8Enabled": true,
    "team.showWelcomeMessage": false,
    //using autopep8 format
    //"python.formatting.provider": "yapf",
    "python.linting.flake8Args": [
        "--max-line-length=248"
    ],
    "editor.formatOnSave": true,
    "editor.minimap.enabled": true,
    "editor.fontSize": 13,
    "editor.formatOnPaste": true,
    "editor.multiCursorModifier": "ctrlCmd",
    "editor.snippetSuggestions": "top",
    "editor.renderIndentGuides": false,
    "workbench.iconTheme": "vscode-icons",
    "workbench.colorTheme": "Monokai",
    "python.jediEnabled": false,
    "C_Cpp.clang_format_fallbackStyle": "{BasedOnStyle: LLVM, IndentWidth: 4, BreakBeforeBraces: Custom, BraceWrapping: {AfterFunction: true}}"
}

0x01 c++ 自动格式配置

参考网站:

https://clang.llvm.org/docs/ClangFormatStyleOptions.html
https://stackoverflow.com/questions/45823734/vs-code-formatting-for