Sublime text support for Google style guide
Asked Answered
B

1

6

I am using sublime text 3 for writing C++ code. We follow Google style guide for CPP.

I am looking for any plugins which provide auto-reindent and linter support using the style guide as reference.

Bathilda answered 25/3, 2015 at 22:52 Comment(2)
clang-format has a Google option IIRC.Rhyolite
revisiting after a long time .. thanks to @Rhyolite i have been using this - packagecontrol.io/packages/Clang%20FormatBathilda
K
8

I just tried https://github.com/timonwong/SublimeAStyleFormatter and it seems to be working fine.

You will have to edit the user settings ("Sublime Text" > "Preferences" > "SublimeAStyleFormatter" > "Settings - User") to the following:

// 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"
    }
}

You can have interesting options like "autoformat_on_save", indentation stuff, etc.

Klaus answered 17/11, 2015 at 22:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.