Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you change the formatting options in Visual Studio Code?

I know you can Format Code using Ctrl+F / Cmd+F in Visual Studio Code but how do you change the formatting options for each language?

For example, in Visual Studio 2013 I can choose compact mode for CSS.

Is there another hidden JSON file to do that?

like image 512
Matt McCabe Avatar asked May 05 '15 22:05

Matt McCabe


1 Answers

Update 2022

Solution A:

Press Ctrl+Shift+P

Then type Format Document With...

At the end of the list click on Configure Default Formatter...

Now you can choose your favorite beautifier from the list.

Solution B:

go to file -> preferences -> settings search for format, on the left side, click on Text Editor, the very first item on the right side is Editor: Default Formatter from the dropdown you can pick any document formatter which you installed before.

like image 127
Sajad Saderi Avatar answered Sep 27 '22 23:09

Sajad Saderi