Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>prettier vue template stringNew to Visual Studio Code? Get it now.

prettier vue template string

kaijialin

|
168 installs
| (0) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

pvts README

Helps you format html template strings more conveniently.

demo

Requirement

You have to use the following annotation to mark up the html

const template = /* html */ `
  <div>hello world</div>
`;

note: The start tag and end tag of the template string need to be on a separate line, due to the limitations of the current regular expression implementation.

Usage

Shortcuts

alt + p

Command

html template prettier

Prettier rulus

default:

{
  "arrowParens": "always",
  "bracketSpacing": true,
  "endOfLine": "lf",
  "htmlWhitespaceSensitivity": "css",
  "insertPragma": false,
  "jsxBracketSameLine": false,
  "jsxSingleQuote": false,
  "printWidth": 80,
  "proseWrap": "preserve",
  "quoteProps": "as-needed",
  "requirePragma": false,
  "semi": true,
  "singleQuote": false,
  "tabWidth": 2,
  "useTabs": false,
  "vueIndentScriptAndStyle": false,
  "parser": "html"
}

Currently not customizable :joy:

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft