Allow more short versions for keyboard maps
pokey opened this issue · comments
If we have parentheses mapped to wp
, then we'd like to be able to just press p
after aw
(for wrap
). However, if we add wwp
for escaped parentheses, that breaks, because they both end with p
. It would be nice if wp
could own p
because it has fewer letters to drop?
Fwiw then we'd have an inconsistency because you might expect wp
to be escaped parens, as they both just drop that leading w
. Maybe we solve that by using wep
instead of wwp
, so then it shortens to ep
. I believe we'd still need this fix tho if we wanted wp
to shorten to p
in that case, as they both end with p
Cc/ @josharian
Makes sense. The rule would be that you can break (some) ambiguities by choosing the shortest unique continuation?
For the near term, seems like adjusting the shortcuts to be unambiguous might be the easiest fix.
The rule would be that you can break (some) ambiguities by choosing the shortest unique continuation?
Yeah I believe so
For the near term, seems like adjusting the shortcuts to be unambiguous might be the easiest fix.
That does make escaped pairs a bit awkward because we'll need to find suffixes for them that differ completely from their unescaped counterparts 😕
Yeah, that’s how I landed with the (I thought at the time very clever) double prefix. I’m game to switch to shortest wins, though.