Skip to content

Closing brackets in replace mode #6126

@nikpappas

Description

@nikpappas

Description

Most IDEs behave in a certain way when closing brackets and quotes.
Opening a bracket you automatically get the matching closing bracket, which is nice, but if you try to close the bracket manually you get a duplicate bracket. I think most people when writing brackets and quotes that don't contain anything, will by momentum immediately close the bracket themselves, or prefer to hit the closing bracket key than the right arrow, in order to get the cursor to the end of the line. That's why most IDE overwrite the matching closing bracket/quote, under certain circumstances.
example when I type the below code, I always end up going back end removing the extra brackets:
void setup(){} -> void setup()){}}

Expected Behavior

I would like when I type a closing bracket/quote immediately after an equivalent opening bracket, that the closing bracket to be overwritten.

Current Behavior

Typing the below void setup() one ends up with void setup()) and the cursor in the position second to last, which is a bit inconvenient. I do like the auto-closing brackets, and I wouldn't want to have to disable the feature.

Your Environment

  • Processing version: 3.5.4
  • Operating System and OS version: macOS 10.14.6
  • Other information:

Possible Causes / Solutions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions