Skip to content
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] Custom selection transform #42

Closed
vkhobor opened this issue Sep 14, 2022 · 1 comment
Closed

[Feature Request] Custom selection transform #42

vkhobor opened this issue Sep 14, 2022 · 1 comment

Comments

@vkhobor
Copy link

vkhobor commented Sep 14, 2022

Hi!

I was looking for a way to transform selected text to other formats. My use case was that I wrote a list comma separated and not markdown formatted, and I wanted to transform it via a command.

From:

apple, banana

To:

- apple
- banana

I've seen this plugin supports Transform selection to uppercase which is similar, only the logic is different.

I was wondering if something like Transform selection to uppercase with custom js code could be supported or if you know any plugins that have this functionality.

Thank you for the help.

@timhor
Copy link
Owner

timhor commented Sep 15, 2022

You could use Select all occurrences of selection to select the comma delimiters and then press Enter and -? That should get you most of the way for this use case.

If it's a common action you need to perform, you can also create a macro to chain those operations in the QuickAdd plugin.

@timhor timhor closed this as completed Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants