我正在使用sublime text 3来编写C ++代码。 我们关注Google style guide for CPP。
我正在寻找任何使用样式指南作为参考提供自动重启和linter支持的插件。
答案 0 :(得分:4)
我刚试过https://github.com/timonwong/SublimeAStyleFormatter,似乎工作正常。
您必须编辑用户设置(" Sublime Text">"偏好设置">" SublimeAStyleFormatter">"设置 - 用户& #34;)以下内容:
// 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",缩进内容等等有趣的选项。