Skip to content

P2-10: Auto-close brackets and quotes #38

@hybridmachine

Description

@hybridmachine

Description

Automatically insert closing brackets and quotes when typing an opener.

Implementation

  • In SCN_CHARADDED, detect opening characters: (, [, {, ", ', `
  • Insert corresponding closing character after cursor
  • If text is selected, wrap selection with pair
  • Skip-over: if typing closing char and it's already there, just move cursor
  • Backspace on empty pair deletes both characters
  • Language-aware: disable quote pairing inside strings/comments
  • Preference toggle: "Auto-close brackets"

Key Files

  • macos/platform/main_phase7.mm
  • macos/platform/settings_manager.h

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2-nice-to-haveNice to have, 1.1 if not readysize/MMedium (1-3 days)

    Projects

    Status

    Ready

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions