Skip to content

Maybe adjust behavior of useTabOnHangingIndent? #103

@jkyeung

Description

@jkyeung

This is more of a question or comment than a feature request or bug report: What's the rationale for putting the cursor just before the closing bracket rather than just after, upon pressing Tab?

If I've got

foo = (|)

and press Enter to get

foo = (
    |
)

and then type some elements, like

foo = (
    'spam',
    'ham',|
)

I would think that I am trying to get to

foo = (
    'spam',
    'ham',
)|

or perhaps even

foo = (
    'spam',
    'ham',
)
|

as simply and easily as possible, but Tab actually gets me to

foo = (
    'spam',
    'ham',
|)

which is probably very rarely what I want. And by that time, the closing bracket is no longer considered "automatically inserted" by VS Code, and is thus not subject to the default typeover. (Setting "editor.autoClosingOvertype": "always" could help, but some people can't stomach that option.)

I've been playing around with this a little bit, because it's close to allowing me to feel OK about letting VS Code autoclose brackets for me, but not quite there. And clearly most people don't seem to have any problem with the current VS Code behavior, with or without useTabOnHangingIndent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpull requests welcomePRs will be reviewed, but maintainers will not fix.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions