Created
November 21, 2019 14:56
-
-
Save kunosu/d7b807d09ff0fd002907688d857940a3 to your computer and use it in GitHub Desktop.
VSCのC言語フォーマッタ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// C言語フォーマッタ | |
// https://www.pynote.info/entry/clang-format-settings | |
// AlignEscapedNewlines: Left // 改行エスケープを整列可能な一番左側で整列 | |
// AlignOperands: true // 1行に収まらない場合、単項または2項演算子を整列する | |
// AllowShortBlocksOnASingleLine: false // 短いif文などを1行にしない | |
// AlwaysBreakAfterReturnType: None // 関数宣言の戻り型で改行しない | |
// BreakBeforeBraces: Attach // { の前で改行しない] | |
// ColumnLimit: 120 // 1行の最大文字数 | |
// ContinuationIndentWidth: 4 // 1つの文を改行する場合のインデントの幅 | |
// IndentCaseLabels: false // caseラベルをインデントしない | |
// IndentPPDirectives: BeforeHash // プリプロセッサのインデントする | |
// IndentWidth: 4 // インデントの幅 | |
// IndentWrappedFunctionNames: true // 関数の宣言及び定義で改行が必要な場合、改行後にインデントを入れる | |
// ReflowComments: false // コメントの自動改行禁止 | |
// SpaceAfterCStyleCast: true // キャスト後空白入れる | |
// SpaceBeforeAssignmentOperators: true // 代入演算子の前に空白を入れる | |
// SpacesInCStyleCastParentheses: false // キャストの丸括弧内に空白を入れない | |
"C_Cpp.clang_format_style": "{AlignEscapedNewlines: Left, AlignOperands: true, AllowShortBlocksOnASingleLine: false, AllowShortCaseLabelsOnASingleLine: false, AllowShortFunctionsOnASingleLine: Empty, AlwaysBreakAfterReturnType: None, BreakBeforeBraces: Attach, ColumnLimit: 80, ContinuationIndentWidth: 4, IndentCaseLabels: false, IndentPPDirectives: AfterHash, IndentWidth: 4, IndentWrappedFunctionNames: true, ReflowComments: false, SpaceAfterCStyleCast: true, SpaceBeforeAssignmentOperators: true, SpacesInCStyleCastParentheses: false, TabWidth: 4, UseTab: Always, }" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment