This extension allows you to add a variable to env file and sample-env file automatically by right clicking on the line and click on Add Line to env.
This extension save you the stress of creating .env file and sample-env file.
To add this line to env file automatically;
const KEY = "MysecretKey";
Right click on the line
Click on Add Line to env
The line will change to:
const KEY = process.env.KEY
The env and sample-env file will also be populated
This extension requires that autoenv.filename key be added to your VSCODE settings.json file and value should be the sample-env filename, if not privided it will default to sample-env. See example below
Initial release of autoenv
Add a new Gif
ALlow extension be compatible with previous versions of vscode