New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request - Make it easily extensible by the user #1
Comments
I had been thinking something like this and also kind of macro that you could create by concatenating list of commands which will be executed in sequence. Either way, thank you for posting. Will update soon. |
I have got initial version working. Due to some limitations on the vscode api front, we are not able to do couple of things. Here is how it works. Add custom commands to settings.json as below.
You can add as many commands as possible. When you make changes commands, you need to restart the vscode so we can register those commands again. Due to api limitation, you cannot search for command in the command palette since as of now we cannot register command dynamically with a title or category of command. But you can still keybind them using command id. The command id for above custom command will be In addition to that, texty also adds additional command The script can contain any javascript script. You can use following variables in the script. selection => current selection Hope this works for you. |
* #1 Add support for custom script and custom commands * Fix documentation and context variables
Released as version 1.1.1 |
This is awesome. Thanks @brsanthu! I'll give this a try soon |
This is a very cool extension. I have been looking for something like it here: Using Python or TypeScript to transform text that I select in VSCode.
From what I understand though, the extension currently only supports a fixed, pre-defined set of string transformations or commands. How difficult would it be to make it extensible for the end user ?
For example, let's say that I want to define my own string functions:
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?
The text was updated successfully, but these errors were encountered: