Home > Article > Development Tools > What is the shortcut key for formatting code in vscode?
What are the shortcut keys for formatting code in vscode
Visual Studio Code can use the following shortcut keys Format code:
● On Windows Shift Alt F
● On Mac Shift Option F
● On Ubuntu Ctrl Shift I
Implement automatic code formatting when saving:
1) File-[Preferences]-[Settings];
2) Search emmet.include;
3) Add the following statement in [Workspace Settings] under settings.json:
"editor.formatOnType": true, "editor.formatOnSave": true
4) Just write any code for testing.
Related recommendations: "vscode usage tutorial"
The above is the detailed content of What is the shortcut key for formatting code in vscode?. For more information, please follow other related articles on the PHP Chinese website!