Skip to content

Instantly share code, notes, and snippets.

@KmolYuan
Last active September 1, 2020 07:56
Show Gist options
  • Save KmolYuan/7b2af3b1aacac2fce0c7bbe41bd8bab8 to your computer and use it in GitHub Desktop.
Save KmolYuan/7b2af3b1aacac2fce0c7bbe41bd8bab8 to your computer and use it in GitHub Desktop.
My C ++ writing habits.
BasedOnStyle: Google
Language: Cpp
ColumnLimit: 80
IndentWidth: 4
PointerAlignment: Right
UseTab: Never
SpaceBeforeParens: ControlStatements
SpacesInParentheses: false
SpaceBeforeRangeBasedForLoopColon: true
SpaceAfterTemplateKeyword: false
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesBeforeTrailingComments: 2
ReflowComments: true
AlwaysBreakTemplateDeclarations: Yes
AllowAllParametersOfDeclarationOnNextLine: true
IncludeBlocks: Merge
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
BreakConstructorInitializers: BeforeColon
ConstructorInitializerAllOnOneLineOrOnePerLine: true
IndentCaseLabels: false
BreakBeforeBraces: Attach
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment