Skip to content

Conversation

@nikpappas
Copy link

@nikpappas nikpappas commented Nov 25, 2020

Most of the IDEs and code editors when they match closing brackets they also allow for the closing bracket to be replaced when typed explicitly. I found myself typing double closing brackets and then removing them too often when I realised it was simple enough to implement this new behaviour.

It only affects the current behaviour if:

  1. If the editor.completion.auto_close prop is true
  2. If the input string is a single character
  3. The next character in the text area is exactly the same as the input one.
  4. The next character is a closing bracket
  5. The previous character is the equivalent opening bracket.

If all those are true then instead of typing in the character the caret moves to the next position.

Closes #6126

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Closing brackets in replace mode

1 participant