C-Sublime-Template-for-Competitive-Programming Install two packages CppFastOlympicCoding SublimeAStyleFormatter Go to Preferences > Package settings > SublimeAStypeFormatter > Settings - Default. Set auto_format_on_save = true