c++ - 对谷歌风格指南的 Sublime Text 支持

标签 c++ ide sublimetext google-style-guide

我正在使用 sublime text 3 编写 C++ 代码。 我们关注Google style guide for CPP .

我正在寻找任何使用样式指南作为引用来提供自动重新缩进和 linter 支持的插件。

最佳答案

我刚试过 https://github.com/timonwong/SublimeAStyleFormatter它似乎工作正常。

您必须将用户设置(“Sublime Text”>“首选项”>“SublimeAStyleFormatter”>“设置 - 用户”)编辑为以下内容:

// This is a simplified settings file that only defines the coding style of your project
{
    "options_default": {
        // Default bracket style
        // Can be either "allman", "ansi", "bsd", "break", "java", "attach", "kr", "k&r",
        // "k/r" "stroustrup", "whitesmith", "banner", "gnu", "linux", "horstmann", 
        // "1tbs", "otbs ", "pico", "lisp", "python", or ""
        "style": "google"
    }
}

你可以有一些有趣的选项,比如“autoformat_on_save”、缩进等等。

关于c++ - 对谷歌风格指南的 Sublime Text 支持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29268010/

相关文章:

sublimetext - Sublime Text 3-将默认 “Plain Text”设置为Java

javascript - 使用 Sublime Text 3 自动完成 JavaScript if 语句的不必要的分号

c++ - Qt - 使用带有父参数的 new 创建对象 - 不删除?

c++ - 如何可视化 C/C++ #define 指令?

linux - 在 Linux 上运行的基于文本的强大 Java IDE

syntax-highlighting - Sublime Text - C++ 高亮

c++ - 使用 std::chrono::high_resolution_clock 时不匹配 "operator ="

C++ 负数组索引

c++ - 初始化并访问<QVector< QVector<int>> QT5

Delphi编译器警告指向Delphi自己的单元