Bracket Matching
See a nearby matching delimiter while editing.
Availability
Partially implemented in stable. Read the limits below before relying on this workflow.
Reviewed against stable v0.5.1. Rust candidate additions are labeled separately. Release status.
The pain this solves
- Nested delimiters can be difficult to pair by eye.
What ships with it
- Highlights a matching delimiter near the editor cursor for configured pairs.
- The scanner tracks nesting depth but is not syntax-aware.
- A jump helper exists without the advertised shortcut wiring; unmatched-error styling is not implemented.
Questions this answers
- Does the editor highlight matching brackets?
- Which delimiters does Chau7 check?
- Is jump-to-match available from a keyboard shortcut?
How it works
When bracket matching is enabled, the editor checks the delimiter at the current selection and uses NSTextView's find indicator to highlight a matching character.
The matcher includes parentheses, square brackets, braces, and angle brackets and scans forward or backward while tracking nesting depth.
The source contains a jump-to-matching helper, but the stable code does not show it connected to the advertised keyboard shortcut. The scanner is not syntax-aware and does not report unmatched delimiters as errors.
Why it matters
A visible matching delimiter can help orient you in nested text. Describe the stable behavior as delimiter highlighting rather than a full syntax-aware structural editor.
Frequently asked questions
Which characters are matched?
The matcher defines pairs for parentheses, square brackets, braces, and angle brackets.
Does it highlight mismatched delimiters as errors?
The stable matching code highlights a match when it finds one; it does not implement the advertised unmatched-error treatment.
Is jump-to-match bound to a shortcut?
A helper exists in source, but a user-facing jump shortcut is not wired in v0.5.1.