atom / bracket-matcher

Jump to brackets
MIT License
142 stars 98 forks source link

remove-matching-brackets should be more flexible #148

Open aaronjensen opened 9 years ago

aaronjensen commented 9 years ago

Currently, remove-matching-brackets acts as a normal backspace if you have a selection. Instead, it should act as remove-brackets-from-selection does. Furthermore, remove-brackets-from-selection (and the new remove-matching-brackets) should look just out outside of the selection for brackets if they're not found within the selection. This is a lot more usable and plays nicely with select-inside-brackets.

If this is done, remove-matching-brackets could theoretically be removed, and the convenient ctrl-backspace binding can be a swiss army knife.

Some nice usages:

ctrl-cmd-m ctrl-backspace ( to replace existing brackets with parenthesis (very similar to cs[( in vim-surround).

mantkiew commented 7 years ago

also, ctrl+alt+ backspace cannot be used with multiple selections which is a pain. It should work on both the opening and closing brackets equally.