You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When chaining delimiters, e.g (foo(bar)), and then at (foo(bar)|) you press backspace to remove foo(bar)you end up with (|, but what you really wanted was (|).
This is sometimes a huge annoyance when having many delimiters and keeping track of how many open delimiters there are.
I propose a feature similar to balance_matchpair that keep track of opening pairs, and tries to only remove empty pairs when there is an even amount of pairs.
One problem with this is of course how to handle cases like the following rust code
let x:A<B<C>|> = foo(2 > 1);
here when we arrive at let x: A<B<|> = 2 > 1; we do have an even amount of delimiters, as such the correct behaviour would be to remove the empty pair, even if what we really wanted was to only remove the <. Now, we could make it so that we only check the left side, but I doubt that would fix anything. I'm not sure if this could be implemented (and I could always just use "_di) or "_di( but it'd sure be a nice addition.
The text was updated successfully, but these errors were encountered:
When chaining delimiters, e.g
(foo(bar))
, and then at(foo(bar)|)
you press backspace to removefoo(bar)
you end up with(|
, but what you really wanted was(|)
.This is sometimes a huge annoyance when having many delimiters and keeping track of how many open delimiters there are.
I propose a feature similar to
balance_matchpair
that keep track of opening pairs, and tries to only remove empty pairs when there is an even amount of pairs.One problem with this is of course how to handle cases like the following rust code
here when we arrive at
let x: A<B<|> = 2 > 1;
we do have an even amount of delimiters, as such the correct behaviour would be to remove the empty pair, even if what we really wanted was to only remove the<
. Now, we could make it so that we only check the left side, but I doubt that would fix anything. I'm not sure if this could be implemented (and I could always just use"_di)
or"_di(
but it'd sure be a nice addition.The text was updated successfully, but these errors were encountered: