Add cycle all case conversion action for ease of access.#6
Add cycle all case conversion action for ease of access.#6PramodGarg wants to merge 2 commits intosilvasur:masterfrom
Conversation
|
First, sorry for the late reply 🙇♀️ I'm not convinced this cycling through the conversions makes it easier to access the conversions. This is mostly what the CamelCase Plugin is doing. I developed my plugin precisely because I didn't like this cycling through all the case converstions. I think it's a lot easier to have separate actions for each casing. This lets you immediately do what you need in a particular situation and makes it possible to use the conversions in a macro. For discoverability, there is the "Edit > Convert Case" menu, also all actions are named "Convert Case: ..." to make them easily searchable in the "Find Action" palette. Some remarks on the code: If you have multiple selections and invoke the new cycle action, each selection will have another casing. This happens because 0001-0319.webmAs a user I would have expected that all selections get the same casing. This is also how all other conversion actions in this plugin work. So this should be fixed. I don't really like that all actions needed changing. They are now all calling case CAMEL:
return CamelCaseAction.replaceString(s);you'd do this case CAMEL:
return (new CamelCaseAction()).replace(s);no changes to the other actions would then be necessary. Also with that change, you could just store the |
Added a new action that allows to cycle all the possible conversions.