As I prefer single quote in HTML, how can I configure my VScode editor to autocomplete HTML tag's attribute's value string with single quotes?
I've tried installing Prettier
and set "prettier.singleQuote": true
or set
"javascript.preferences.quoteStyle": "single",
"typescript.preferences.quoteStyle": "single"
or set configs for Emmet
:
"emmet.syntaxProfiles": {
"html": {
"attr_quotes": "single"
}
}
But these options won't affect HTML auto-completion.
So when I type something like: <meta charset=
and hit Enter
VScode will complete with double quotes:
<meta charset=""
How to get the result like:
<meta charset=''
There is a new setting just merged into Insiders v1.62:
html.completion.attributeDefaultValue
with the options: empty | singleQuotes | doubleQuotes
doubleQuotes
is the default.
See https://github.com/microsoft/vscode/pull/129284 and https://github.com/microsoft/vscode/commit/8d70e049dd1f15ce1f4a114c801b71aa9183c00b
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With