0

How come VSCode does not support C style formatting by default?

Meaning put curly braces on a new line instead of using same line.

For example:

int main()
{

}

instead of:

int main() {

}

I'd love to know why.

  • Because C programmers aren't Java-centric ? The default formatting style is Allman with most IDEs. I strongly advise you adhere to that, because the *vast* majority of the worlds C programmers certainly do. – WhozCraig Oct 16 '20 at 09:14
  • C != javascript, the first snippet is more often used – David Ranieri Oct 16 '20 at 09:14
  • There is an answer for C++ [here](https://stackoverflow.com/questions/45823734/visual-studio-code-formatting-for) which needs an extension to be installed. – Weather Vane Oct 16 '20 at 09:18
  • 2
    Are you asking the question "why did MS do this?" or "how can I configure my code format?" – Weather Vane Oct 16 '20 at 09:22
  • Using same line is WAY better – rioV8 Oct 16 '20 at 11:48
  • I'm asking why VSCode / MS does not support this by default? If you read the first line it should be fairly clear, -"How come VSCode does not support C style formatting by default?" – Martin Magnusson Oct 18 '20 at 14:49

0 Answers0