Skip to content

Instantly share code, notes, and snippets.

@xgalaxy
Last active November 27, 2017 00:41
Show Gist options
  • Select an option

  • Save xgalaxy/e36910ba723849da146f705347a8adad to your computer and use it in GitHub Desktop.

Select an option

Save xgalaxy/e36910ba723849da146f705347a8adad to your computer and use it in GitHub Desktop.

Revisions

  1. xgalaxy revised this gist Nov 27, 2017. 1 changed file with 13 additions and 86 deletions.
    99 changes: 13 additions & 86 deletions .clang-format
    Original file line number Diff line number Diff line change
    @@ -1,86 +1,13 @@
    ---
    Language: Cpp
    AccessModifierOffset: -4
    AlignAfterOpenBracket: Align
    AlignConsecutiveAssignments: false
    AlignConsecutiveDeclarations: false
    AlignEscapedNewlinesLeft: true
    AlignOperands: true
    AlignTrailingComments: true
    AllowAllParametersOfDeclarationOnNextLine: true
    AllowShortBlocksOnASingleLine: false
    AllowShortCaseLabelsOnASingleLine: false
    AllowShortFunctionsOnASingleLine: None
    AllowShortIfStatementsOnASingleLine: false
    AllowShortLoopsOnASingleLine: false
    AlwaysBreakAfterReturnType: None
    AlwaysBreakBeforeMultilineStrings: true
    AlwaysBreakTemplateDeclarations: true
    BinPackArguments: true
    BinPackParameters: true
    BraceWrapping:
    AfterClass: true
    AfterControlStatement: false
    AfterEnum: true
    AfterFunction: true
    AfterNamespace: true
    AfterObjCDeclaration: true
    AfterStruct: true
    AfterUnion: true
    BeforeCatch: true
    BeforeElse: true
    IndentBraces: false
    BreakBeforeBinaryOperators: None
    BreakBeforeBraces: Custom
    BreakBeforeInheritanceComma: false
    BreakBeforeTernaryOperators: true
    BreakConstructorInitializersBeforeComma: false
    BreakStringLiterals: true
    ColumnLimit: 0
    ConstructorInitializerAllOnOneLineOrOnePerLine: false
    ConstructorInitializerIndentWidth: 3
    ContinuationIndentWidth: 3
    Cpp11BracedListStyle: true
    DerivePointerAlignment: false
    FixNamespaceComments: true
    IncludeCategories:
    - Regex: '^<.*\.h>'
    Priority: 1
    - Regex: '^<.*'
    Priority: 2
    - Regex: '.*'
    Priority: 3
    IndentCaseLabels: false
    IndentWidth: 3
    IndentWrappedFunctionNames: false
    KeepEmptyLinesAtTheStartOfBlocks: false
    MaxEmptyLinesToKeep: 1
    NamespaceIndentation: All
    ObjCBlockIndentWidth: 3
    ObjCSpaceAfterProperty: false
    ObjCSpaceBeforeProtocolList: false
    PenaltyBreakBeforeFirstCallParameter: 1200
    PenaltyBreakComment: 100
    PenaltyBreakFirstLessLess: 200
    PenaltyBreakString: 800
    PenaltyExcessCharacter: 100
    PenaltyReturnTypeOnItsOwnLine: 1200
    PointerAlignment: Left
    ReflowComments: true
    SortIncludes: true
    SpaceAfterCStyleCast: false
    SpaceAfterTemplateKeyword: false
    SpaceBeforeAssignmentOperators: true
    SpaceBeforeParens: ControlStatements
    SpaceInEmptyParentheses: false
    SpacesBeforeTrailingComments: 2
    SpacesInAngles: false
    SpacesInCStyleCastParentheses: false
    SpacesInContainerLiterals: true
    SpacesInParentheses: false
    SpacesInSquareBrackets: false
    Standard: Cpp11
    TabWidth: 4
    UseTab: Never

    ...
    #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
    Language : Cpp
    BasedOnStyle : Google
    Standard : Cpp11
    #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
    AccessModifierOffset : -4
    BreakBeforeBraces : Stroustrup
    ColumnLimit : 160
    IndentWidth : 4
    IndentPPDirectives : AfterHash
    TabWidth : 4
    UseTab : Never
    #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
  2. xgalaxy revised this gist Nov 27, 2017. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions .clang-format
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,6 @@
    ---
    Language: Cpp
    # BasedOnStyle: Google
    AccessModifierOffset: -3
    AccessModifierOffset: -4
    AlignAfterOpenBracket: Align
    AlignConsecutiveAssignments: false
    AlignConsecutiveDeclarations: false
    @@ -81,7 +80,7 @@ SpacesInContainerLiterals: true
    SpacesInParentheses: false
    SpacesInSquareBrackets: false
    Standard: Cpp11
    TabWidth: 3
    TabWidth: 4
    UseTab: Never

    ...
  3. xgalaxy revised this gist May 17, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .clang-format
    Original file line number Diff line number Diff line change
    @@ -81,7 +81,7 @@ SpacesInContainerLiterals: true
    SpacesInParentheses: false
    SpacesInSquareBrackets: false
    Standard: Cpp11
    TabWidth 3
    TabWidth: 3
    UseTab: Never

    ...
  4. xgalaxy renamed this gist May 17, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. xgalaxy created this gist May 17, 2017.
    87 changes: 87 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,87 @@
    ---
    Language: Cpp
    # BasedOnStyle: Google
    AccessModifierOffset: -3
    AlignAfterOpenBracket: Align
    AlignConsecutiveAssignments: false
    AlignConsecutiveDeclarations: false
    AlignEscapedNewlinesLeft: true
    AlignOperands: true
    AlignTrailingComments: true
    AllowAllParametersOfDeclarationOnNextLine: true
    AllowShortBlocksOnASingleLine: false
    AllowShortCaseLabelsOnASingleLine: false
    AllowShortFunctionsOnASingleLine: None
    AllowShortIfStatementsOnASingleLine: false
    AllowShortLoopsOnASingleLine: false
    AlwaysBreakAfterReturnType: None
    AlwaysBreakBeforeMultilineStrings: true
    AlwaysBreakTemplateDeclarations: true
    BinPackArguments: true
    BinPackParameters: true
    BraceWrapping:
    AfterClass: true
    AfterControlStatement: false
    AfterEnum: true
    AfterFunction: true
    AfterNamespace: true
    AfterObjCDeclaration: true
    AfterStruct: true
    AfterUnion: true
    BeforeCatch: true
    BeforeElse: true
    IndentBraces: false
    BreakBeforeBinaryOperators: None
    BreakBeforeBraces: Custom
    BreakBeforeInheritanceComma: false
    BreakBeforeTernaryOperators: true
    BreakConstructorInitializersBeforeComma: false
    BreakStringLiterals: true
    ColumnLimit: 0
    ConstructorInitializerAllOnOneLineOrOnePerLine: false
    ConstructorInitializerIndentWidth: 3
    ContinuationIndentWidth: 3
    Cpp11BracedListStyle: true
    DerivePointerAlignment: false
    FixNamespaceComments: true
    IncludeCategories:
    - Regex: '^<.*\.h>'
    Priority: 1
    - Regex: '^<.*'
    Priority: 2
    - Regex: '.*'
    Priority: 3
    IndentCaseLabels: false
    IndentWidth: 3
    IndentWrappedFunctionNames: false
    KeepEmptyLinesAtTheStartOfBlocks: false
    MaxEmptyLinesToKeep: 1
    NamespaceIndentation: All
    ObjCBlockIndentWidth: 3
    ObjCSpaceAfterProperty: false
    ObjCSpaceBeforeProtocolList: false
    PenaltyBreakBeforeFirstCallParameter: 1200
    PenaltyBreakComment: 100
    PenaltyBreakFirstLessLess: 200
    PenaltyBreakString: 800
    PenaltyExcessCharacter: 100
    PenaltyReturnTypeOnItsOwnLine: 1200
    PointerAlignment: Left
    ReflowComments: true
    SortIncludes: true
    SpaceAfterCStyleCast: false
    SpaceAfterTemplateKeyword: false
    SpaceBeforeAssignmentOperators: true
    SpaceBeforeParens: ControlStatements
    SpaceInEmptyParentheses: false
    SpacesBeforeTrailingComments: 2
    SpacesInAngles: false
    SpacesInCStyleCastParentheses: false
    SpacesInContainerLiterals: true
    SpacesInParentheses: false
    SpacesInSquareBrackets: false
    Standard: Cpp11
    TabWidth 3
    UseTab: Never

    ...