In order to format code in Visual Studio Code (VS Code) you can make use of the below keyboard shortcuts depending upon which operating system you are working on,
1. Using Keyboard Shortcuts
Windows
Shift + Alt + F
Mac (macOS)
Shift + Option + F
Ubuntu (Linux)
Control + Shift + I
2. Using Menu Option
Simply right-click on your file/document and select the option "Format Document"

3. Using the VS Code Palette
- Press Keys Command + Shift + P on Mac (Control + Shift + P on Windows) to open Palette.
- Now Search for Format Document

Happy Coding!
Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!