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

Replace mode when closing bracket #6124

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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