我正在使用 sublime text 3 编写 C++ 代码。我们遵循CPP 的 Google 风格指南。
我正在寻找任何使用样式指南作为参考提供自动重新缩进和 linter 支持的插件。
我正在使用 sublime text 3 编写 C++ 代码。我们遵循CPP 的 Google 风格指南。
我正在寻找任何使用样式指南作为参考提供自动重新缩进和 linter 支持的插件。
我刚刚尝试了https://github.com/timonwong/SublimeAStyleFormatter,它似乎工作正常。
您必须将用户设置(“Sublime Text”>“Preferences”>“SublimeAStyleFormatter”>“Settings - User”)编辑为以下内容:
// 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”、缩进等。