-- Sorry for the English, I used Google Translator --
After a long conversation with @alexandrudima the same suggested that he open that issue.
@alexandrudima, I do not know if that's what you imagined .. so feel free to edit.
By default all single and double quotation marks should auto close if you have words + space.
By default all single and double quotation marks should not close if it is next to the word. For single quotes should be considered apostrophe.
Here are examples of how to share the quotes. Similiar to Atom and Sublime.
Eg1:

Eg2:

Allow the same to be set up separately for comments. (This is the javascript that auto closes single quotation marks in code, but not when used in comments.) By default it should follow the above rules.
There may be a question of syntactic and semantic, depending on the language. So let the resource by language.
There are still letters that allow you to have apostrophes along with single quotes. It does not interfere with semantics and maintains syntax highlighting.
+1
I could not find any extensions, too.
I have pushed a change where ' and " do not auto-close if inserted after a word character (as defined via editor.wordSeparators), in the cases that ' and " are defined to be auto closing pairs by the language configuration.
@alexandrudima Is this change for all languages?
The weekend I take it easy, but at first I tested HTML, JavaScript, Properties and C ++ (because you had spoken in the other case :smile:). And Properties did not work.
From the first moment that would be the idea !! :smiley:
Related, but possibly a separate feature request: I'd love to have a setting to disable automatic quote insertion altogether. Assuming it's not already there and I can't find it. It's wrong enough that the time spent fighting it makes it kind of a wash. The suggestions above would definitely improve it, but I just don't think it's so necessary.
Other common patterns I run into:
I propose that editor.autoClosingBrackets would have 3 states:
editor.autoClosingBrackets doesn't work to auto close quotation marks on Mac
Somebody have any idia why?
Having this problem too.
@perdona I solved that problem creating a snippet for JS files with ' and "
"Close quotation marks": {
"prefix": "'",
"body": [
"'$1'"
],
"description": "Autoclose quotation marks"
},
"Close quotation marks double": {
"prefix": "\"",
"body": [
"\"$1\""
],
"description": "Autoclose quotation marks"
}
@nathpaiva where do I put it? Sorry, new to vscode. Also, can I do the same with Python? Thx
Files / Preferences / User snippets
@perdona command + shift + p > open user snippets > and choose the type of file you want to use
Still not working guys. After saving the snippets, my single and double quotes are still not autoclosing.
@perdona with snippets will work with after press tab
Hello, i solved this issue with this extension: https://marketplace.visualstudio.com/items?itemName=konstantin.wrapSelection
i hope this feature could be by default in coming versions.
Thanks.
This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.
If you wonder what we are up to, please see our roadmap and issue reporting guidelines.
Thanks for your understanding and happy coding!
Most helpful comment
editor.autoClosingBracketsdoesn't work to auto close quotation marks on MacSomebody have any idia why?