Skip to content

Auto-close curly braces within f-strings and t-strings #7620

@DECROMAX

Description

@DECROMAX

Description

I have noticed that curly braces do not automatically close within f-strings (or t-strings)
The standard expectation in most modern text editors is that typing an opening brace { will automatically insert the closing brace }. The lack of this feature within the editor disrupts flow .

Suggested solution

When a user is inside an f-string or a t-string and types {, the editor should automatically:

  1. Insert the closing }
  2. Place the cursor between the braces: { | }

Are you willing to submit a PR?

  • Yes

Alternatives

Typing } 😄

Additional context

Impact: Low/Medium (Quality of Life improvement).

Environment:

  • Chrome Version 143.0.7499.169

  • Marimo Verson 0.18.4

  • Python 3.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions