jyp / boon

Ergonomic Command Mode for Emacs
GNU General Public License v3.0
330 stars 34 forks source link

Make boon-toggle-case composable #75

Open contrapunctus-1 opened 4 years ago

contrapunctus-1 commented 4 years ago

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).

jyp commented 4 years ago

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.

contrapunctus-1 commented 4 years ago

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.

jyp commented 3 years ago

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.