boon icon indicating copy to clipboard operation
boon copied to clipboard

Make boon-toggle-case composable

Open contrapunctus-1 opened this issue 6 years ago • 3 comments

IMHO boon-toggle-case should work the same way as boon-take-region/boon-substitute-region/boon-treasure-region - it should accept arguments for words and sentences *, cycling through Mixed Case ("Mixed case." for sentences), lower case, and UPPER CASE (depending on the capitalization of the first word).

  • I haven't actually seen a sentence object so far. It's something I miss in Boon, but that's a matter for another issue.

contrapunctus-1 avatar Nov 04 '19 09:11 contrapunctus-1

I agree that it'd be more consistent. However, I find that I use this command very often on just the current character. I'd be happy to change this for consistency and locally configure my init.el, but I'm wondering if what is your use-case for changing the behavior.

jyp avatar Nov 18 '19 15:11 jyp

I like toggling/cycling the case instead of the standard Emacs/Vim idea of separate commands for upcase and downcase. If toggling case operated on motion and text objects too, it would become a single command for all capitalization situations.

contrapunctus-1 avatar Nov 18 '19 18:11 contrapunctus-1

If changing case should take an object as argument, then it cannot be a toggle between 3 states, which it is now. I'd be happy to take a patch or make a 3 functions boon-uppercase boon-lowercase boon-capitalize, which you can then bind as appropriate.

jyp avatar Feb 12 '21 21:02 jyp