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

Parameter support #9

Open
at-ng opened this issue Nov 18, 2021 · 1 comment
Open

Parameter support #9

at-ng opened this issue Nov 18, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@at-ng
Copy link

at-ng commented Nov 18, 2021

I think it would be nice if parameters were supported for snippets. This would probably work similar to variables but the value is entered as an argument/parameter instead (unless it's possible to trigger an actual prompt asking for input). Then you could for example create a snippet like this:

repeast5=${par:1} ${par:1} ${par:1} ${par:1} ${par:1}

You would call is with "repeat5 hello" and get the string "hello hello hello hello hello" back. This specific example is not super useful (a repeat command would be more useful if there is scripting to enable "repeat hello 5"). However parameter support in itself can be a time saver, for example if you have a long SQL query as a snippet but you need to add a search key in the middle of the query (possibly in multiple places).

@dozius dozius added the enhancement New feature or request label Dec 19, 2021
@dozius
Copy link
Owner

dozius commented Dec 19, 2021

This is pretty complicated. I'm not sure it could even be done in a plugin in a way that makes sense or even at all. If someone wants to work on this, by all means. I have no interest in this feature.

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

No branches or pull requests

2 participants