Vscode configures the code format of Vue project

Time:2021-4-10
  1. Install the plug-in vetur first
  2. settings.json It is amended as follows:
    "vetur.format.defaultFormatter.html": "prettyhtml",
     "vetur.format.defaultFormatterOptions": {
         "prettyhtml": {
             "Printwidth": 100, // 100 characters per line
             "Singlequote": false // force single quotation to double quotation
         }
     },
  3. Format code: Shift + Alt + F

Summary: settings.json The configuration of is only for the HTML part, JS part is still not perfect, I don’t know if there is a better solution?

This work adoptsCC agreementReprint must indicate the author and the link of this article

Recommended Today

Review of SQL Sever basic command

catalogue preface Installation of virtual machine Commands and operations Basic command syntax Case sensitive SQL keyword and function name Column and Index Names alias Too long to see? Space Database connection Connection of SSMS Connection of command line Database operation establish delete constraint integrity constraint Common constraints NOT NULL UNIQUE PRIMARY KEY FOREIGN KEY DEFAULT […]