Let's say I select some text in the editor. I would like to define my own Python functions or scripts that:
- Take as an input the selected text as a string.
- Transform it and return a new string that replaces the selected text back in the editor
Moreover, I would like to ideally register these functions or scripts as a VSCode commands (with a specific commandIDs) that I can define myself and to the command palette in VSCode. By doing so, I can bind them to a shortcut in keybindings.json with specific shortcuts and when clauses.
Is there any built-in functionality in VSCode to do this? If not, what set of steps can I follow to do it?
