command-variable icon indicating copy to clipboard operation
command-variable copied to clipboard

Is there an easy standard way to define a string value and use it in configurations?

Open woung717 opened this issue 6 months ago • 7 comments

I think this plugin is fantastic. But at first I couldn't figure out how to define a simple variable and use it in the configuration field value. After reading through the readme file, I can achieve this using something like this.

...
"${input:plain_text}",
...
"inputs": [
        {
            "id": "plain_text",
            "type": "command",
            "command": "extension.commandvariable.transform",
            "args": {
                "text": "Hello, World!"
            }
        }
    ]
...

Is there a simpler way to define and use variables in the launch.json file instead of using transform? If there is, it would be good to have an example in the readme file.

woung717 avatar Aug 27 '24 05:08 woung717