-
-
Notifications
You must be signed in to change notification settings - Fork 84
around destination? #1799
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
Comments
Interesting idea. How to handle wrapping into different holes of a snippet? Today we use eg |
The obvious analogue is |
I guess that could work, it's just that "snip " feels like it is the name of the snippet itself, which is the same snippet no matter which hole you're wrapping into. But I wouldn't say this is a showstopper; I still think this grammar is an interesting idea. Prob worth tossing on the to-discuss list |
Even deeper into "ponies" land...
I needed to wrap a dozen select statements today in I thought I was clever and created a custom wrapper snippet, but it was a lot of work to get it all hooked up correctly and iron out the bugs, and in the end it was clearly a waste of time. Some text in a split editor like |
Yeah ad hoc snippets were one of the eventual ideas behind building the code that we use for "snippet make" today I also touch briefly on ad hoc snippets in #46 I think nowadays I'd be tempted to do it prefixed by a command like "with hole " to indicate the hole, eg "with hole air bring call air around bat" |
Discussed briefly with @AndreasArvidsson and while this grammar seems reasonable, we're not clear what problem this new grammar would be solving. You mention the following:
Not sure I follow the problem here. How do
Not sure I follow. If you want to inject multiple targets into holes of the snippet, then where does the snippet itself end up? Unless the targets are directly adjacent, it's not clear where to put the snippet, unlike wrapping a single target, where the snippet replaces that target |
I thought about this more carefully. The fully ambiguous cases are a bit of a stretch. For example, if
I'm not entirely convinced that there aren't other less concocted examples involving homophones / near homophones instead of straight up ambiguity. That said, I think what's really going on is that I mentally model talent commands as a giant decision tree, and I want everything snippet related to be under snip, rather than scattered around as a bunch of early roots. Which is not necessarily a good reason. :)
Good point. |
Another use case: the I find it hard to use because it requires selecting the target first ( |
Call with two targets is actually already supported in our api. You just need to add a spoken form for it. :) |
Should we do that for everyone? (Do you have a spoken form for it already?) |
I personally don't use it, but we could do that. |
We removed it a while ago to improve talon performance. Those performance issues should no longer be a problem, so I'd be happy to have it re-added. |
I will start on it a asap! |
pr: #1900 |
Very crude idea here, just jotting it down.
Problem
Wrapper snippets live in the top level Talon namespace. They compete with all other commands. This makes them hard to name, particularly as they become numerous.
Proposal
An "around" destination. Then instead of
"if wrap air"
it'd be"snip if around air"
, just as it is"snip range before/to/after air"
.This could also be used as an alternate spoken form for paired delimiter wrapping. Instead of
"curly wrap air"
it could be"wrap curly around air"
.This might also open the path to multiple positional holes in snippets, if the target had multiple ranges selected. But this gets complicated quickly.
The text was updated successfully, but these errors were encountered: