Home > Web Front-end > HTML Tutorial > HTML code formatting method in vue file

HTML code formatting method in vue file

小云云
Release: 2018-05-24 09:18:45
Original
6504 people have browsed it

This article mainly shares with you the formatting method of HTML code in vue files. I hope it can help you.

Problem: Generally, using Shift+Alt+F, you can format the JS and CSS parts, but the template part does not respond.

1. Search and install the “Vetur” plugin in the app store


##2. Configuration. File-> Preferences-> Settings, add these two sentences in the edit box

"prettier.tabWidth": 4,
"vetur.format.defaultFormatter.html": "prettier"
Copy after login


## 3. Finally press the formatting shortcut key Shift+Alt+F

Related recommendations:

javascript - Is there an open source library for js, css, html code formatting?

The above is the detailed content of HTML code formatting method in vue file. 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