vscode-change-case icon indicating copy to clipboard operation
vscode-change-case copied to clipboard

"Copy case to clipboard" commands

Open joaopaulobdac opened this issue 3 years ago • 2 comments

I often find myself wanting to just copy something in a different case without changing it. One use case is for creating files: suppose I have a value named HelloController and I'm going to create the file controllers/hello_controller.ex. I would just copy the name of the value in snake case, leaving it unchanged.

joaopaulobdac avatar Feb 16 '21 05:02 joaopaulobdac

Good idea! Thank you. —SA

SAKryukov avatar Nov 28 '23 08:11 SAKryukov

Come to think about it, not only is your idea excellent, but worth implementing. As a matter of fact, I've just published the solution: Yet Another Change Case

This implementation is very different from similar extensions. I rationalized the requirements, keeping in mind the life cycle of textual expressions, and how they are converted to programming identifiers and visa versa. For example, I implemented splitting by case, repeating the last operation, and an optional clipboard. This is really what we need to use. Also, the input is more structured and clear.

Also, I looked through several extensions and found a lot of unacceptable bugs. The most typical one is improper tracking of the current UI session state, so the commands remain accessible when there is no active editor, and that leads to an exception. Hopefully, it all works correctly.

Hope you enjoy it. Thank you for the good idea.
—SA

SAKryukov avatar Nov 30 '23 23:11 SAKryukov