Search code examples
visual-studio-codeicloud

Sync vscode instances


I'm setting up a new machine and want to have as much synced between my two machines as possible. I use vscode as my main editor and would like, if possible, to have the two instances synced. I'm wanting to copy some settings folder to my iCloud drive, and then symlink it back to it's location on my local drives.

If I did this, will open files sync in real time, or only on startup? Will this likely lead to anything being corrupted? Is this even possible? Finally, what folder must I sync?


Solution

  • I'm doing exactly this nowadays (after using Settings Sync for a while) – syncing settings via my iCloud folder.

    The content of ~/Library/Application Support/Code/User is what you are looking for.

    I linked keybindings.json and settings.json and they both work fine without hickups so far. You might want to sync the folder snippets too.

    workspaceStorage makes no sense to sync because they are specific to the workspaces you open on a single machine.

    It works basically "out of the box". Even if a new setting gets not picked up instantly by a running VSCode instance if it syncs in the background while open, you can always cmd+shift+p Reload Window or open and close the settings (I almost never have to do this).