Home > Development Tools > VSCode > How to beautify code with vscode

How to beautify code with vscode

藏色散人
Release: 2019-12-21 09:56:46
Original
6822 people have browsed it

How to beautify code with vscode

How does vscode beautify the code?

First of all, the picture shows the effect of an open css file without line breaks. There is only one line in the entire file, and formatting has no effect.

Related recommendations: vscode introductory tutorial

How to beautify code with vscode

Formatting refers to code that is separated into lines but is not indented and has inappropriate spacing. , becomes appropriate. VSCode comes with code formatting.

Open File->Preferences to open the settings panel.

How to beautify code with vscode

As shown in the figure, search for format to find options related to formatting. Copy the settings you want to change to the right and modify them.

How to beautify code with vscode

If you want to beautify the code (line wrap), first click the extension button on the left, then search for Beautify in the extension store, and then download the first plug-in.

How to beautify code with vscode

After installation, reload VSCode, press f1 to open the command, search for Beautify, and click Beautify file to beautify the entire file.

How to beautify code with vscode

As shown in the picture is the effect after beautification. The code is automatically wrapped and formatted. This beautification operation supports source code in multiple formats.

How to beautify code with vscode

The above is the detailed content of How to beautify code with vscode. 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