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

Is it possible to create a variable number of placeholders? #220

Open
diego-rapoport opened this issue Oct 8, 2021 · 3 comments
Open

Is it possible to create a variable number of placeholders? #220

diego-rapoport opened this issue Oct 8, 2021 · 3 comments

Comments

@diego-rapoport
Copy link

When you create an init in a python class, you have a variable number or variables that you define.
Something like:

class Person:
   def __init__(self, arg1, arg2 ...):
       ...

And for each one you usually have:

self.arg1 = arg1
self.arg2 = arg2

Can I make a snippet in a way that for each arg I increase it generates a new self.argx = x?

@hrsh7th
Copy link
Owner

hrsh7th commented Oct 8, 2021

Sorry. vsnip does not support dynamic snippet. You can use LuaSnip or UltiSnips for it.

@diego-rapoport
Copy link
Author

diego-rapoport commented Oct 8, 2021

No one else ever requested it as a feature? Because I really would like to use that feature instead of migrating to another snippet. If it's not the intention of the project at all to make that a feature, I'll use another project then.

@hrsh7th
Copy link
Owner

hrsh7th commented Dec 16, 2021

Yes. dynamic tab-stop isn't a goal of this project.
The dynamic variable can achieve this (maybe) but it's too hard to implement. So for now, you should use other plugins for what you want, I think.

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