Skip to content

Option to ask for user input for undefined variables? #136

@jasonboukheir

Description

@jasonboukheir

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions