Home > Development Tools > VSCode > body text

vscode automatically formats code

王林
Release: 2020-02-07 14:45:37
Original
6643 people have browsed it

vscode automatically formats code

First install Prettier -Code formatter [code formatter] in code

vscode automatically formats code

The second step is to open it in the menu bar Settings

vscode automatically formats code

The third step is to search prettier in the search bar, click to edit in settings

vscode automatically formats code

The fourth step is to add one Statement for formatting code when saving

"editor.formatOnSave": true

vscode automatically formats code

If an error occurs, it may be in the previous one There is no comma at the end of the statement

Just add it

vscode automatically formats code

Recommended related articles and tutorials: vscode tutorial

The above is the detailed content of vscode automatically formats code. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!