How to format code in Visual Studio Code on Windows

user5827623 picture user5827623 · Mar 14, 2016 · Viewed 60.1k times · Source

How can I format code in Visual Studio Code in the last update on Windows.

I tried Ctrl+ K, Ctrl + D doesn't work...

I also tried Shift + Alt + F. It didn't work either.

I tried the following solution, but that is not the issue:

How do you format code in Visual Studio Code?

Answer

Dev pro picture Dev pro · Mar 23, 2016

If you are working on PHP you should download the PHP extension format code.

Press F1 and type:

ext install PHP Code Format

Then Shift + Alt + F will work.