How to use a relative path for custom emmet snippets
10:03 31 Mar 2023

I created a snippets.json like this:

{
    "html": {
        "snippets": {
        }
    },
    "css": {
        "snippets": {
            "bs": "block-size",
            "bbc": "border-block-color",
            "bbs": "border-block-start",
            "bbw": "border-block-width",
            "bbe": "border-block-end"
        }
    }
}

It's saved in my VS Code settings in the user profile (C:\Users\sebastian.laube\AppData\Roaming\Code\User\emmet\snippets.json)

How do I note the path in the setting emmet.extensionsPath as a relative path, and will it get synced with Settings Sync?

I don't want to set the absolute path (written above) because the username on my other system is not the same and since the settings.json is saved in the VS Code settings folder, there must be a way to use relative paths.

These settings are not working:

    "emmet.extensionsPath": [
        "snippets/",
        "%APPDATA%\\Code\\User\\emmet\\",
        "%APPDATA%/Code/User/emmet/",
        "${appData}/Code/User/emmet/",
        "${appData}\\Code\\User\\emmet\\",
        "${env:APPDATA}/Code/User/emmet/",
        "${env:APPDATA}\\Code\\User\\emmet\\"
    ],
visual-studio-code emmet