How to enable auto removal of brackets in pairs?

Answered

Smart keys adds a closing bracket by itself when we insert an opening bracket

However when I remove one of the brackets, the other bracket isn't deleted, just like in VS Code. How do i enable such a feature?

0
1 comment

Hi Restinggoal777 

It works for me if I type [ or { (the closing bracket is inserted automatically at this point) and then press Backspace to delete the first bracket. The second bracket is deleted along with it.

If the above scenario doesn't work for you, see if it helps to reset IDE settings to defaults (a backup copy will be created in the process): File | Manage IDE Settings | Restore Default Settings

Other than that, there is no functionality out of the box that would allow simultaneous deletion of opening and closing brace/bracket/quote. 

Alternatives:

  • Wrapping several shortcuts into a macro to achieve a similar result
  • There's also the opposite action of Surround With called Unwrap that allows you to delete part of the expression around a statement (e.g., the surrounding if block).
0

Please sign in to leave a comment.