Vscode-project-manager: Support enviroment variables in rootPath

Created on 19 Mar 2019  路  1Comment  路  Source: alefragnani/vscode-project-manager

I've tried to use:

"rootPath": "c:\\Users\\${env:USERNAME}\\Documents\\Projects\\xyz",

But the variable isn't replaced. The variable is based on this article: https://code.visualstudio.com/docs/editor/variables-reference

question

Most helpful comment

Hi @thomasfrobieter ,

The extension does not support those variables. Those are available only for Debugging and Tasks (VS Code native operations).

If you want your _home folder_, you could use $home instead. This is a special variable that I created in the extension, exactly for this 馃榾 . Its use is described here.

  {
        "name": "Bookmarks",
        "rootPath": "$home\\Documents\\GitHub\\vscode-bookmarks",
        "paths": [],
        "group": "",
        "enabled": true
    }

Use a special variable called $home while defining any path. It will be replaced by the HOME folder.

Hope this helps

>All comments

Hi @thomasfrobieter ,

The extension does not support those variables. Those are available only for Debugging and Tasks (VS Code native operations).

If you want your _home folder_, you could use $home instead. This is a special variable that I created in the extension, exactly for this 馃榾 . Its use is described here.

  {
        "name": "Bookmarks",
        "rootPath": "$home\\Documents\\GitHub\\vscode-bookmarks",
        "paths": [],
        "group": "",
        "enabled": true
    }

Use a special variable called $home while defining any path. It will be replaced by the HOME folder.

Hope this helps

Was this page helpful?
0 / 5 - 0 ratings

Related issues

johnbillion picture johnbillion  路  3Comments

codeshark1 picture codeshark1  路  5Comments

wottpal picture wottpal  路  4Comments

s97712 picture s97712  路  4Comments

tdmalone picture tdmalone  路  3Comments