Navigation Menu

Skip to content
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

Auto closing brackets should try to balance brackets #6841

Open
vsccarl opened this issue May 24, 2016 · 8 comments
Open

Auto closing brackets should try to balance brackets #6841

vsccarl opened this issue May 24, 2016 · 8 comments
Labels
editor-autoclosing Editor automatic closing of parens / brackets / etc. feature-request Request for new features or functionality
Milestone

Comments

@vsccarl
Copy link

vsccarl commented May 24, 2016

  • VSCode Version: 1.1.0-alpha
  • OS Version: Windows 10

Steps to Reproduce:

  1. Open launch.json or create one
  2. Delete the opening bracket { under configurations
  3. Re-type the opening bracket

Auto-complete adds in a closing bracket when the closing bracket at the end of the config is showing an error. It would make sense that bracket auto-complete would know that there is an open bracket and to not add the closing bracket at the top.

@vsccarl vsccarl added the v-test label May 24, 2016
@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Jul 8, 2016
@alexdima alexdima added this to the Backlog milestone Jul 8, 2016
@egamma egamma removed the v-test label Aug 22, 2016
@alexdima
Copy link
Member

Auto closing brackets are not taking language semantics into account

@alexdima alexdima added feature-request Request for new features or functionality editor-bracket-matching Editor brace matching and removed bug Issue identified by VS Code Team member as probable bug labels Sep 27, 2017
@alexdima alexdima removed their assignment Sep 27, 2017
@alexdima alexdima added editor-autoclosing Editor automatic closing of parens / brackets / etc. and removed editor-bracket-matching Editor brace matching labels Oct 20, 2017
@alexdima alexdima changed the title Bracket auto-completion doesn't recognize an existing closing bracket Bracket auto-completion does not count brackets Oct 16, 2019
@alexdima alexdima changed the title Bracket auto-completion does not count brackets Auto closing brackets is not balancing brackets Oct 16, 2019
@alexdima alexdima changed the title Auto closing brackets is not balancing brackets Auto closing brackets does not balance brackets Oct 16, 2019
@alexdima alexdima changed the title Auto closing brackets does not balance brackets Auto closing brackets should try to balance brackets Oct 16, 2019
@alexdima alexdima modified the milestones: Backlog, Backlog Candidates Oct 24, 2019
@vscodebot
Copy link

vscodebot bot commented Jan 15, 2020

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@schokotets
Copy link

Where would one upvote the issue? Just as I did, by giving a thumbs-up on the bot's message?
I'd really like this to be implemented for #13982

@vscodebot
Copy link

vscodebot bot commented Mar 6, 2020

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding

@rmunn
Copy link
Contributor

rmunn commented Mar 6, 2020

@schokotets You upvote an issue by leaving a thumbs-up on the first comment (the issue description), not on the bot's message.

@vscodebot
Copy link

vscodebot bot commented Mar 11, 2020

🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@vscodebot vscodebot bot modified the milestones: Backlog Candidates, Backlog Mar 11, 2020
@rhyek
Copy link

rhyek commented Sep 19, 2021

When implemented this new option could potentially replace the current "beforeWhitespace". As of now, typing in a TypeScript file has the following inconsistent behaviors:

Scenario 1

  • with text someFunction;
  • type a ( before ;
  • result is someFunction(;

Scenario 2

  • with text someFunction);
  • type a ( before )
  • result is someFunction());

Scenario 3

  • with text someFunctionsomeParam);
  • type a ( before someParam
  • result is someFunction(someParam);

Only the last scenario produces the expected behavior and in the previous two are both undesired (from a practical standpoint) and inconsistent behaviors.

vsc: 1.60.1
macos big sur

@toni-neurosc
Copy link

Any progress on this? I'm surprised this isn't still implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor-autoclosing Editor automatic closing of parens / brackets / etc. feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

7 participants