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

Question: Using placeholder inside VIM interpolation #179

Open
ajitid opened this issue Mar 29, 2021 · 2 comments
Open

Question: Using placeholder inside VIM interpolation #179

ajitid opened this issue Mar 29, 2021 · 2 comments

Comments

@ajitid
Copy link

ajitid commented Mar 29, 2021

Is it possible to use placeholder inside ${VIM:? I want to use something like "body": "${1}, ${VIM:g:Abolish.dashcase(${1})}" so that whenever first ${1} value changes, second value automatically gets converted into dash case.

I've looked at initialization point but couldn't understand what it means.

This question is on the same lines as this other issue in which alternatives to transform feature is discussed.

@hrsh7th
Copy link
Owner

hrsh7th commented Mar 29, 2021

Currently, no. It' a very complex (but fun) feature.

I had tried it #126 but in previous thoughts, It's fun but not useful.

Please explain how it's useful.

@ajitid
Copy link
Author

ajitid commented Mar 29, 2021

I was already using a snippet in VSCode similar to this. As vsnip doesn't support transform features, it isn't possible to achieve this but instead if vsnip allows combining VIM: interpolation with placeholders, not only we will be able to get the same functionality back but also we will get more flexibility over VS Code snippets as we then be able to use any Vim function in it.

In my case for example, I'll be able to call and use functions from Abolish plugin to transform text in a placeholder which is dependent upon another placeholder.

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