vscode-text-power-tools icon indicating copy to clipboard operation
vscode-text-power-tools copied to clipboard

[Feature request] Make it easily extensible

Open amelio-vazquez-reina opened this issue 5 years ago • 1 comments

This is a cool extension. I have been looking for something like it here: Using Python or TypeScript to transform text that I select in VSCode.

Looking at the source code, it looks like the extension currently only supports a fixed, pre-defined set of string transformations and commands. How difficult would it be to make it extensible?

For example, let's say that I want to define my own string functions:

function add_space_around_text(selected_text) {
    return "  " + selected_text + "  ";
}

and I'd like to register a command ID of my choice with that function (via settings, i.e. without having to re-install the extension, that is)

IMHO - That could make the extension more extensible and even more powerful.

What do you think?

amelio-vazquez-reina avatar Dec 14 '19 21:12 amelio-vazquez-reina

I think it will be possible. I'll look into how it can be implemented. Thanks for the suggestion!

qcz avatar Dec 19 '19 09:12 qcz