nat-418 / boole.nvim

Neovim plugin for toggling booleans, etc.
BSD Zero Clause License
164 stars 7 forks source link

[Feature] Expose a function similar to `generate` to be able to easily write case insensitive pairs #14

Closed rkmiec closed 1 year ago

rkmiec commented 1 year ago

Personally, I wrote a few pairs to operate on, but I miss the possibility to define more than one pair of the same type quickly: Enable/Disable enable/disable ENABLE/DISABLE light/dark Light/Dark zero/one/two/three/four/... Zero/One/Two Left/Down/Up/Right left/down/up/right

There is a generate method already available, but it is local and not that useful to write simple sets.

nat-418 commented 1 year ago

I have extended the generate method by reworking the capitalization behavior so that now you can do foo -> bar, Foo -> Bar, and FOO -> BAR. I haven't tried handling fOo -> bAr, seems like it would be annoying to implement.

I have also made that method available and updated the README with an example using enable / disable. Please let me know if this resolves the issue for you.