A C
A C

Reputation: 21

VSCode auto-indent (C) after if/while without {}.

I'm working with VSCode and for now I didn't find my answer after walking arround forums for a while now.

I wanted to know if there is a way to have an auto indent while having statement (if/while etc) without adding brace :

if (test)
   test;

For now i don't have any auto-indent :

if (test)
test;

I tried several settings already, even on different OS (Windows/Linux). Thanks you !

Upvotes: 2

Views: 3192

Answers (1)

nullp0tr
nullp0tr

Reputation: 485

File -> Preferences -> Settings -> Editor: Format on Save.

If that doesn't work you probably don't have the C/C++ plugin for VSCode installed.

Upvotes: 1

Related Questions