VS code google代码风格设置

2020-04-06  本文已影响0人  Optimization

参考资料:

[1]VSCode 添加clang-format扩展
[2]团队效率工具: 代码格式化之Clang-format

操作:

sudo apt-get install clang-format
linux类似这样:
{
    "clang-format.executable": "/usr/lib/llvm-3.8/bin/clang-format",
    //鼠标滑动改变字体大小
    "editor.mouseWheelZoom": true,
    //改变左侧界面字体
    "window.zoomLevel": 1.5,
    "editor.fontSize": 18,
    "[cpp]": {
        "editor.defaultFormatter": "xaver.clang-format"
    },
    "editor.formatOnSave": true,
    "clang-format.style": "Google",
    "extensions.ignoreRecommendations": true
    //改变编辑器字体大小
    //"editor.fontSize": 15,
}
win类似这样:
{
    "editor.fontSize": 25,
    "window.zoomLevel": 0,
    "leetcode.endpoint": "leetcode-cn",
    "leetcode.workspaceFolder": "C:\\Users\\optimization\\.leetcode",
    "todo-tree.tree.showScanModeButton": false,
    "clang-format.executable": "C:\\Users\\optimization\\.vscode-insiders\\extensions\\ms-vscode.cpptools-0.28.3\\LLVM\\bin\\clang-format.exe",
    "[cpp]": {
        "editor.defaultFormatter": "xaver.clang-format",
    },
    "editor.formatOnSave": true,
    "clang-format.style": "Google"
}
上一篇下一篇

猜你喜欢

热点阅读