How to format source code in Visual Studio Code (VSCode)

preview_player
Показать описание
1. VSCode – Code Formatting Shortcuts
The code formatting is available in Visual Studio Code (VSCode) through the following shortcuts or key combinations:

On Windows Shift + Alt + F
On macOS Shift + Option + F
On Linux Ctrl + Shift + I

2. VSCode – Code Formatting Shortcut #2
Alternatively, click on the source code editor, right clicks and select the Format Document option.
Рекомендации по теме