-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't always disable auto pairs when not before a whitespace #42956
Comments
Other example from #43039 They want to auto-close only in situations when there is a space after your caret: |
how about parenthesis right before semicolon?.. or that's a different case? |
Same issue. The auto pair heuristic currently does not add a closing bracket when the next character is not a whitespace or line end. |
Please work on this soon, I would really like to see it implemented! |
@rebornix FYI |
when you try to write an arrow function inside of setTimeout, where 1000 ms have written already: so, the comma does not allow the curly braces to be expanded |
Just ran into this, and, when using mustache style syntax, it can be a real hang up. Is there a way to turn this off across the board? Why should their be a discrepancy? |
@rebornix What would you think of just delegating the determination of which characters allow matching to the user via settings? I have a branch up here: https://github.com/JacksonKearl/vscode/tree/feature-demo/auto-closing-config that demos this. This is how it looks if you set (First run through is with the new setting second is original) |
/duplicate #35197 |
Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines. Happy Coding! |
From #18071 (comment)
When adding a quote after the
=
in<div class=></div>
you will get<div class='>
but would rather like to have<div class=''>
Auto-pairs tests whether character after the cursor is a new line or a whitespace. Otherwise it will not insert the pair, just a single quote.
We should extend the language specification to give a list of characters where auto-pairs are enabled. In the case of HTML, for
'
and"
, that would be>
The example is quite common in HTML when adding attributes to existing elements.
The text was updated successfully, but these errors were encountered: