I like the functionality of autoclosing brackets, quotations, etc... but when you're inside a string for instance: "<inside here>
" and you start typing a single quote or if the quotes are inverted it'll try to auto pair quotations inside the string. Is there a way to disable this functionality inside strings?
Single quotation marks are used to indicate quotations inside of other quotations. “Jessie said, 'Goodbye,'” Ben said. This is Ben talking, so his words go in quotation marks. But because we're quoting Ben quoting someone else, Jessie, we use single quotation marks to indicate the quote within the quote.
' You can put a backslash character followed by a quote ( \" or \' ). This is called an escape sequence and Python will remove the backslash, and put just the quote in the string.
Single & Double Quotes Enclose strings. Either single or double quotes are fine. Use single quotes as enclosing quotes to eliminate the need of escaping double quotes in a string, and vice versa.
// Controls if the editor should automatically close brackets after opening them
"editor.autoClosingBrackets": false,
In your settings.json
file will disable auto-closing brackets, parentheses, quotes, etc.
There is no separate switch for selectively disabling quotation matching, only a global setting for all.
There is a setting to disable auto-closing of all quotes in the latest version of VSCode as of August 2018 in VSCode 1.27. Add this to your settings.json
:
"editor.autoClosingQuotes": "never"
If you want to disable this for a specific language, nest the above setting under a language-specific setting. For example, to exclusively disable this for the scheme
language,
"[scheme]": {
"editor.autoClosingQuotes": "never",
},
Unfortunately, I do not think there is an option to exclusively disable auto-closing of single quotes or double quotes.
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