Skip to content

autoClosingBrackets should not autoclose if already followed by another character #20801

@MartinSGill

Description

@MartinSGill
  • VSCode Version: 1.9.1
  • OS Version: Win10

Steps to Reproduce:

The following variable (where | is the cursor) needs to be turned into an array:

const names = |'bob';

I type [ and the results is:

const names = [|]'bob';

What I expect to happen is:

const names = [|'bob';

In almost every case I can think of, when a bracket/quote is typed directly in front of an existing character it should not be automatically closed, as added that extra bracket results in more work for the editor. (IntelliJ behaves this way, and I think it's a good approach).

Surrounding selected text is of course, already possible, but if someone does just type it themselves the editor should respect that and not hamper the coder by added a character they most likely didn't need.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugeditor-bracket-matchingEditor brace matchingverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions