I am typing emmet in vscode, but I want the output to be single quotation, so I wrote this in settings.json.
"emmet.syntaxProfiles": {
"html": {
"attr_quotes": "single"
}
}
This will be a single for now.
For example, if you type a and press tab, this is what happens.
<a href='>>/a>
However, when you start typing from class or href, it becomes a double quotation.
For example, if the div tag is already written and you insert a class into it or insert a href into the a tag with emmet, it becomes double like this.
<div class="">
<a href="">
Is there a way to output this as a single as shown below?
<div class='">
<a href='>
Inserting only class and href is not a feature of Emmet, so that is not enough configuration (Note: Emmet Feature Matrix https://docs.emmet.io/abbreviations/syntax/).
In settings.json
, try adding:
"javascript.preferences.quoteStyle": "single",
"typescript.preferences.quoteStyle": "single"
Of course, Emmet settings are also required.
"emmet.syntaxProfiles": {
"html": {
"attr_quotes": "single"
}
}
© 2024 OneMinuteCode. All rights reserved.