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.

Drew Dormann
  • 59,987
  • 13
  • 123
  • 180
Kalyanaraman Santhanam
  • 1,371
  • 1
  • 18
  • 30

1 Answers1

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.

Victor D.
  • 149
  • 2
  • 9