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

HTML code formatting method in vue file

小云云
小云云Original
2018-05-24 09:18:456472browse

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"


## 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!

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