Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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 multi-input cursor hints #749

Closed
bashfulrobot opened this issue Sep 3, 2021 · 2 comments
Closed

Support multi-input cursor hints #749

bashfulrobot opened this issue Sep 3, 2021 · 2 comments

Comments

@bashfulrobot
Copy link

Hi there,

I am curious, is there a way to expand on:

  - trigger: ":pl"
    replace: 'println!("$|$");'

to support multiple inputs?

I suspect not, as once it is expanded, the tool has no context. But I just thought I would ask.

The only way I could think of is if you could have a single trigger for multiple replace statements (with a user-configurable delay for the first input).

🤔

@federico-terzi
Copy link
Collaborator

Hey @bashfulrobot,

Thank you for the feedback! Indeed, supporting multiple custom hints would be very difficult as espanso doesn't have any contextual information, only the "delta" generated by the keystrokes.
That said, the upcoming version will ship with Regex triggers, which enable some really powerful things like multi-arg inputs in active mode. See: https://twitter.com/terzi_federico/status/1390367027433545728

I'm not sure if that would solve your use case, but I'd say a combination of regex triggers and forms should cover a good portion of them.

I'll leave the issue open as a feature request, perhaps one day we'll find a good way to implement it!

Cheers :)

@federico-terzi federico-terzi changed the title Question - multiple inputs Support multi-input cursor hints Sep 3, 2021
@bashfulrobot
Copy link
Author

Sounds good! I appreciate the feedback.

I had an idea that it would not be easy.

I think the only way to do it otherwise would be to capture the state and delay writing it out until all of the inputs were captured. hm.

But thanks for the time.

@espanso espanso locked and limited conversation to collaborators Jul 2, 2022
@federico-terzi federico-terzi converted this issue into discussion #1229 Jul 2, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants