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

are variables in code snippets supported? #113

Open
Niedzwiedzw opened this issue Dec 5, 2021 · 3 comments
Open

are variables in code snippets supported? #113

Niedzwiedzw opened this issue Dec 5, 2021 · 3 comments

Comments

@Niedzwiedzw
Copy link

I can't find anything in the docs

@Ninjani
Copy link
Member

Ninjani commented Dec 6, 2021

No, only in shell snippets. It would be difficult to support in code snippets I feel, as different languages use different syntax so would need to find something that works across all languages. Do you have an example of this behaviour from another program?

@Niedzwiedzw
Copy link
Author

https://youtu.be/xmBovJvQ3KU?t=173 this guy shows how "yasnippet" handles this in emacs. it even supports some logic in templates (simple text transformations)

@Ninjani
Copy link
Member

Ninjani commented Dec 6, 2021

Interesting! I'm wondering how this would work on the command line though, since the-way is editor-agnostic. With single line shell snippets it's easy to display the whole snippet in the terminal and then list the variables to fill, this wouldn't work for the example in the video for instance.

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