You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a vscode plugin I use frequently called "File Templates", and it has a feature where you can provide the arguments for undefined template variables when creating a file. This is useful for me, because at work we have a header where we have to define the product/module the script belongs to, which isn't easily available through env vars or the filepath.
I'm thinking it might be easy enough to supply the vars as optional parameters to the :Template function. Sort of like: :Template <pattern> <undefined_var_1=value> <undefined_var_2=value>
Perhaps the behavior is that if the variable is defined, these values will override the defaults there?
At the moment, I keep the variables un-expanded, and substitute them when I create the file.
The text was updated successfully, but these errors were encountered:
I came here for the exact same reason. It would be nice to have something like a %USERINPUT% variable that prompts for filling on template insertion.
I haven't looked into it -- don't have time to yet -- but I'll probably try scripting it with the template_user_variables command later.
Hi there! Thanks for the plugin!
There's a vscode plugin I use frequently called "File Templates", and it has a feature where you can provide the arguments for undefined template variables when creating a file. This is useful for me, because at work we have a header where we have to define the product/module the script belongs to, which isn't easily available through env vars or the filepath.
I'm thinking it might be easy enough to supply the vars as optional parameters to the :Template function. Sort of like:
:Template <pattern> <undefined_var_1=value> <undefined_var_2=value>
Perhaps the behavior is that if the variable is defined, these values will override the defaults there?
At the moment, I keep the variables un-expanded, and substitute them when I create the file.
The text was updated successfully, but these errors were encountered: