Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add matchbraceleft option #3432

Merged
merged 1 commit into from
Aug 18, 2024
Merged

Add matchbraceleft option #3432

merged 1 commit into from
Aug 18, 2024

Commits on Aug 18, 2024

  1. Add matchbraceleft option

    Add `matchbraceleft` option to allow disabling the default behavior
    matching not just the brace under cursor but also the brace to the left
    of it (which is arguably convenient, but also ambiguous and
    non-intuitive). With `matchbraceleft` disabled, micro will only match
    the brace character that is precisely under the cursor, and also when
    jumping to the matching brace, will always move cursor precisely to the
    matching brace character, not to the character next to it.
    
    Nota bene: historical journey:
    
    - There was already a `matchbraceleft` option introduced in commit
      ea6a87d, when this feature (matching brace to the left) was
      introduced first time. That time it was matching _only_ the brace
      to the left, _instead_ of the brace under the cursor, and was
      disabled by default.
    
    - Later this feature was removed during the big refactoring of micro.
    
    - Then this feature was reintroduced again in commit d1e713c, in
      its present form (i.e. combined brace matching both under the cursor
      and to the left, simulating I-beam cursor behavior), and it was
      introduced unconditionally, without an option to disable it.
    
    - Since then, multiple users complained about this feature and asked
      for an option to disable it, so now we are reintroducing it as an
      option again (this time enabled by default though).
    dmaluka committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    943deb7 View commit details
    Browse the repository at this point in the history