1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【VSCode】C++の自動整形をインデント4&行頭カッコしないように設定する

Posted at

行頭カッコしないよう、Googleスタイルを使用。

"C_Cpp.clang_format_style": "Google"

ただこの設定だと、インデント2にされて悲しい。

インデント4にするには以下のように設定する。

"C_Cpp.clang_format_style": "{ BasedOnStyle: Google, IndentWidth: 4 }"

もしくは

"C_Cpp.clang_format_style": "{ BreakBeforeBraces: Attach, IndentWidth: 4 }"

参考:
https://gist.github.com/9sako6/458def885387e8dcd2f0f2742a1dc3e4

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?