I know you can jump between matching brackets with Ctrl + Shift + \. I would like to place the cursor right after a bracket and delete both that bracket and its matching one as easily as possible.
Since with Alt + Click you can have multiple selections, I was looking for something similar to: Ctrl + Shift + Alt + \ for placing another cursor on the matching bracket and then deleting both with a single backspace.
Is there any shortcut deleting a pair of matching brackets/parenthesis?
As in, when you press "tab" key near a closing bracket, the cursor will jump over it instead of adding a new tab.
The feature can be enabled by adding the setting "editor. bracketPairColorization. enabled": true .
There is an extension called "Bracketeer" that does what you want.
First, install with
Ctrl-p, then ext install pustelto.bracketeer
, followed by an enter.
You can then add the following to your keybindings.json
{
"key": "ctrl+alt+backspace",
"command": "bracketeer.removeBrackets"
},
You can then use ctrl-alt-backspace to remove matching brackets.
See also:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With