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

Support "replace with" action #15

Closed
pokey opened this issue Jun 23, 2021 · 4 comments · Fixed by #135
Closed

Support "replace with" action #15

pokey opened this issue Jun 23, 2021 · 4 comments · Fixed by #135
Assignees
Labels
enhancement New feature or request

Comments

@pokey
Copy link
Member

pokey commented Jun 23, 2021

Eg "replace fine with camel hello world". It would support arbitrary format string ie "replace <target> with <format_string>". The actual replaceWith function would accept a list of strings so that it can operate on compound targets. So talon-side we could support "replace fine and bar with camel hello world and snake hello there".

Could also support things other than format strings after the "with", eg "spell <letters>" or "word" or "round" / "curly" / "square" that would return eg ["(", ")"], to combine with "boundary", allowing commands like "replace border round with square"

It is tempting to support cursorless targets after the "with" as well, eg "replace fine with gust", but this functionality is subsumed by "bring", eg "bring gust to fine", so not sure it's worth the added complexity

@pokey pokey changed the title Support "replace with" transformation Support "replace with" action Jun 23, 2021
@pokey pokey added action enhancement New feature or request and removed action labels Jun 23, 2021
@pokey
Copy link
Member Author

pokey commented Jun 26, 2021

What are people's thoughts on just reusing "bring" for this, eg "bring camel hello world to fine"? cc/ @brxck @AndreasArvidsson @knausj85

Then changing surrounding square brackets to parentheses would be "bring round to bound square"

@brxck
Copy link
Collaborator

brxck commented Jun 26, 2021

I think this makes sense that this could be under the same command, though it feels like we might be stretching the word "bring."

@AndreasArvidsson
Copy link
Member

Yeah not sure if bring is the correct therm.

What if you want to insert a word used in the alphabet? "bring air to bat" vs "insert air at bat" or "replace bat with air"

@pokey
Copy link
Member Author

pokey commented Jun 26, 2021

To use a word in the alphabet you'd say "bring word air to bat". Yeah I don't feel strongly in this one just trying to reduce the size of the vocabulary to learn haha

@AndreasArvidsson AndreasArvidsson self-assigned this Jul 23, 2021
@AndreasArvidsson AndreasArvidsson linked a pull request Jul 23, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants