Home  >  Article  >  Development Tools  >  What is the shortcut key for formatting code in vscode?

What is the shortcut key for formatting code in vscode?

angryTom
angryTomOriginal
2019-11-04 15:34:3136039browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to use vscode ftpNext article:How to use vscode ftp