Reputation: 248
My vscode does not automatically close the single and double quotes. I've disabled all extensions, but the problem still persists.
vscodeVersion 1.15.0 (1.15.0)
MAC osx: Version 10.12.6 (16G29)
Upvotes: 10
Views: 15043
Reputation: 221
Change your keyboard language to US only instead of US International.
Upvotes: 22
Reputation: 359
It's worth noting that vscode has a separate editor setting for auto closing quotes from that of brackets. If you have: "editor.autoClosingQuotes": "never"
in your settings, then vscode will never close quotes. On the other hand, if you have "editor.autoClosingQuotes": "always"
, then it will always add the extra closing quote.
Upvotes: 20
Reputation: 956
FYI: this is a bug/feature, in that the double quotes auto-close when the cursor has nothing to the right of it. However, when there is something to the right of the cursor, then your only get one quote.
<h1 className="|> <== the closing > on the h1 tag prevents the auto-close.
<h1 className="|" > <== the space to the right allows auto-close to work.
I had a similar issue and came across this link that describes it.
Upvotes: 3