Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide support to synchronize settings across machines #2743

Open
SrTobi opened this issue Feb 5, 2016 · 113 comments
Open

Provide support to synchronize settings across machines #2743

SrTobi opened this issue Feb 5, 2016 · 113 comments
Assignees
Milestone

Comments

@SrTobi
Copy link
Contributor

@SrTobi SrTobi commented Feb 5, 2016

There are quiet some extensions out there to handle setting synchronization between multiple computers. And in my opinion they are very important: Since vscode is very customizable with settings, keyboardshortcuts and extension it is very hard to synchronize those things between multiple workstations. And all those extensions are not really clean solutions, because vscode does nearly nothing to support them (for example the paths vscode uses are not exposed, see #2741).

So here some ideas to make synchronization clean and extensible:

  • add a contribution point for synchronization extensions
    • Those extensions should not have to gather all the files that have to be synced. vscode should do this and then pass them to the extensions
    • Such an extension's job is only to upload/download the files, passed to them (so we can have the gist upload/svn upload/git repo upload/dropbox/filesystem/onedrive/ftp/other services.
    • Or maybe gather all settings into one big json object and pass that.
    • Support versioning and non versioning extensions
  • add a remote_settings.json to build on top of the workspace-settings/user-settings stack.
  • allow automatic and user triggered synchronization

Ok... just some ideas 😄

@Tyriar

This comment has been minimized.

Copy link
Member

@Tyriar Tyriar commented Feb 5, 2016

Related: #679

This is my solution for syncing keybindings and settings on Linux and Windows if you're interested. I haven't looked too deeply at doing it with extensions yet but I did file #691 some time ago to help with this.

@joaomoreno joaomoreno added this to the Backlog milestone Feb 8, 2016
@csholmq

This comment has been minimized.

Copy link

@csholmq csholmq commented Feb 9, 2016

The plugin Sync Settings for Atom uses GitHub Gist to backup/sync:

  • Settings
  • Packages
  • Keymap
  • (Styles)
  • (Init)
  • Snippets

Atom also supports starring packages directly in Github and then easily install them using apm stars --user thedaniel --install.

@felixfbecker

This comment has been minimized.

Copy link
Contributor

@felixfbecker felixfbecker commented Feb 21, 2016

Imo this is a pretty low priority because most of the time settings are overwritten by workspace settings that are synced with version control anyway.

@csholmq

This comment has been minimized.

Copy link

@csholmq csholmq commented Feb 21, 2016

@felixfbecker Extensions are however one of those things that doesn't version control. Neither is keymap.

@felixfbecker

This comment has been minimized.

Copy link
Contributor

@felixfbecker felixfbecker commented Feb 21, 2016

@csholmq That is a seperate issue though. For example, there could be a .vscode/extensions.json that specifies which extensions should be installed for this project, like editorconfig or a specific debug adapter, with a semver version constraint like a package.json.

@egamma

This comment has been minimized.

Copy link
Member

@egamma egamma commented Feb 21, 2016

This is not related to the original API request raised in this issue, but there is a sync extension that is using Gists. https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync

@joaomoreno joaomoreno removed their assignment Feb 22, 2016
@csholmq

This comment has been minimized.

Copy link

@csholmq csholmq commented Feb 22, 2016

@egamma Exactly the functionality I sought after. But as @felixfbecker mentioned, perhaps this issue is a separate one.

@jokeyrhyme

This comment has been minimized.

Copy link

@jokeyrhyme jokeyrhyme commented Mar 14, 2016

It might also be nice to install an extension once on one machine, and have your other machines either prompt or automatically install the same extension everywhere else.

Atom had an online package browser with "stars", and there was a command you could run to install everything you'd starred. Still not automatic, but it was a start.

I know others might object, but I personally have no problem having to log in to VSCode with my Microsoft account once per machine, if it facilitated this level of convenience. Maybe a synchronisation framework or something could be offered, so that provider-specific extensions could implement authentication and cloud-persistence (e.g. one for Microsoft, one for Google Drive, Dropbox, etc).

@golf1052

This comment has been minimized.

Copy link
Member

@golf1052 golf1052 commented Apr 6, 2016

I wrote an extension a while ago (here, also hasn't been updated in a while) that tried to help sync extensions between computers using file synchronization services. Originally I only supported syncing themes because syncing extensions seemed somewhat messy.

I think this should be the right way to maintain extensions between computers. Keep a list of what extensions are installed where, be able to pick and choose what extensions should be installed on which computer and then only manage syncing settings for those extensions. I assume the recommended way for extensions to manage settings is through this?

@felixfbecker

This comment has been minimized.

Copy link
Contributor

@felixfbecker felixfbecker commented Apr 6, 2016

https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync syncs extensions very well

@ToMakeSense

This comment has been minimized.

Copy link

@ToMakeSense ToMakeSense commented Nov 21, 2016

Very much agree with you, Add features--Account & Synchronization, handling setting synchronization and extensions synchronization(Mark extensions owned), what will make it much easier to install and to synchronize VS code between multiple computers.
Another extensions that syncs extensions: https://marketplace.visualstudio.com/items?itemName=golf1052.code-sync

@DamionGans

This comment has been minimized.

Copy link

@DamionGans DamionGans commented Mar 5, 2020

Perhaps you could even sync these settings to Visual Studio Online! My 2 cents :-)

@haugerbr

This comment has been minimized.

Copy link
Member

@haugerbr haugerbr commented Mar 9, 2020

I just saw the preview and wanted to input that syncing snippets should also be included.

@sandy081

This comment has been minimized.

Copy link
Member

@sandy081 sandy081 commented Mar 9, 2020

Syncing snippets and global state is planned for March milestone - #86678

@sandy081

This comment has been minimized.

Copy link
Member

@sandy081 sandy081 commented Mar 10, 2020

All, As you know from our latest release that Settings Sync feature is previewed in insiders. So, please try out the feature using our insiders and provide us with the feedback - https://code.visualstudio.com/insiders/

@001123

This comment has been minimized.

Copy link

@001123 001123 commented Mar 14, 2020

<3 Wish this features come stable

@trusktr

This comment has been minimized.

Copy link

@trusktr trusktr commented Mar 18, 2020

Before spending time to make an extension that syncs everything, I think it'd be more beneficial to spend some time curating what would be the best .gitignore files to include by default in the VS Code folders, then people can start initializing git repos and committing things confidently.

Right now, I basically commit everything in my ~/.vscode folder, including extensions and caches, because honestly I don't know what not to commit.

We should not have to commit all extensions. As an example, like @felixfbecker mentioned, it'd be great if there was a extensions.json file inside the user VS Code folder so we can commit that instead of committing all extensions. With this in place, VS Code team would simply need to ship a nice .gitignore file (that ignores extensions but not extensions.json, etc), and then all of us will be on our merry ways.

After this basic version control stuff is in place, then it will be a lot easier to build "sync" extensions on top of it.

@kaushalyap

This comment has been minimized.

Copy link

@kaushalyap kaushalyap commented Mar 24, 2020

@sandy081 Does this allow sync settings to github for people who do not have a MS account?

@sandy081

This comment has been minimized.

Copy link
Member

@sandy081 sandy081 commented Mar 24, 2020

You can also use your GitHub account to login but it will sync data to MS Azure backend. See doc here - https://code.visualstudio.com/docs/editor/settings-sync#_enabling-settings-sync

@kaushalyap

This comment has been minimized.

Copy link

@kaushalyap kaushalyap commented Mar 24, 2020

@sandy081 Still need to have an Azure or Outlook account.

Cannot we just use gist just like setting-sync? so users do not have to create new accounts.

@darkvertex

This comment has been minimized.

Copy link

@darkvertex darkvertex commented Mar 24, 2020

Cannot we just use gist just like setting-sync? so users do not have to create new accounts.

No. Private Gists are unlisted, but public if you can guess the url. It's dangerous. Wouldn't want any credential-related preferences or tokens accidentally committed into a gist.

@grig0ry

This comment has been minimized.

Copy link

@grig0ry grig0ry commented Mar 24, 2020

It would be convenient to use Github account, without MS Azure.

@OmeGak

This comment has been minimized.

Copy link

@OmeGak OmeGak commented Mar 24, 2020

While I appreciate this feature, I'm honestly not interested in creating a MS account or using GitHub gists to keep my VSCode settings, extensions, etc. synced.

I've always kept my configuration for Sublime Text and Atom happily versioned and fully synced with Git in my dotfiles. While I already do this for VSCode, I haven't found a way to also sync extensions. In Atom, I used package-sync. This allowed me to keep the list of extensions in a packages.cson file. IIRC, Sublime Text did something similar out-of-the box.

I would be happy to see something similar built in VSCode, as this seems to me the sanest approach. But, if not likely to have this feature built-in, is there maybe an extension that does it and escaped my Google-fu skills?

@tjgruber

This comment has been minimized.

Copy link

@tjgruber tjgruber commented Mar 24, 2020

Private gist has been working great for me using the Settings Sync addon by Shan Khan, as well as over 1.5 million other people. That one is good enough IMHO, need nothing else.

@ithinkihaveacat

This comment has been minimized.

Copy link

@ithinkihaveacat ithinkihaveacat commented Mar 24, 2020

@OmeGak My script to sync extensions via bash/dotfiles:

https://github.com/ithinkihaveacat/dotfiles/blob/8a3c9b2cc0e88bcdc6d8c3e3faf47c6f3cc11d1c/update#L390-L399

Not the most easy-to-use approach but hey, it suits me. (And doesn’t require me to create an account.)

@kaushalyap

This comment has been minimized.

Copy link

@kaushalyap kaushalyap commented Mar 25, 2020

Again I am saying we need a way to sync settings without a MS account, (using already existing GH account)

@haugerbr

This comment has been minimized.

Copy link
Member

@haugerbr haugerbr commented Mar 25, 2020

I support having a first party sync option. I have been using settings sync by Shan Khan and while it is nice, I recently found two issues.

  1. Private gists are not locked behind authentication. If someone guesses your gist hash they can see your information.
  2. The extension recently started uninstalling the built-in TypeScript extension from my VSCode and I had to turn off the remove extensions option to fix it. This caused a couple hours of work disruption for me.
@12101111

This comment has been minimized.

Copy link

@12101111 12101111 commented Mar 25, 2020

Will this feature be available on vscode OSS?
I‘m using a musl based Linux system and FreeBSD, and both don't have an official Electron release.

@kaushalyap

This comment has been minimized.

Copy link

@kaushalyap kaushalyap commented Mar 25, 2020

IMHO best way to sync settings is through a git repo
ex: Settings repository by JetBrains
Benefits

  • No new accounts needed, can use any git service (GitHub, Bitbucket, GitLab) which most devs already have
  • Can keep settings private by using a private repository
@neico

This comment has been minimized.

Copy link

@neico neico commented Mar 25, 2020

If privacy is a concern then all it really needs is an export/import feature (which really should be provided when it goes into stable),
as it doesn't need to store things on an external place. (which would include git if you'd use a remote server)

But if I want things synchronized I'd prefer to have it trough the company that build the application in the first place,
if I don't trust that one (at least to a degree), then why would I even consider using their application?

Not to mention that MS also owns github by now, so it really doesn't matter whether you use a MS account or a github one. (with gists, as mentioned being rather insecure, which is why I didn't use that yet and are eagerly awaiting this upcoming feature to be stable)

@kaushalyap

This comment has been minimized.

Copy link

@kaushalyap kaushalyap commented Mar 25, 2020

As @neico said also allow users to export, import their settings as a zip file.

@sandy081

This comment has been minimized.

Copy link
Member

@sandy081 sandy081 commented Mar 25, 2020

I would recommend to create separate issues for separate requirements. Those might get untracked otherwise. So, please create separate issues for your wishes.

@towry

This comment has been minimized.

Copy link

@towry towry commented Mar 27, 2020

It would be convenient to use Github account, without MS Azure.

For developers in China, it's not convenient.

@escape0707

This comment has been minimized.

Copy link

@escape0707 escape0707 commented Mar 27, 2020

It would be convenient to use Github account, without MS Azure.

For developers in China, it's not convenient.

Why? I can use GitHub in China and it seems to be more stable than MS Azure.

@kaushalyap

This comment has been minimized.

Copy link

@kaushalyap kaushalyap commented Mar 27, 2020

@sandy081 Opened separate issues for

  • Allow users to sync settings is through a git repo : #93570
  • Allow users to export, import their settings as a zip file : #93572
@eefan000

This comment has been minimized.

Copy link

@eefan000 eefan000 commented Apr 1, 2020

如果没有MS Azure,使用Github帐户会很方便。

对于中国的开发人员来说,这并不方便。

为什么?我可以在中国使用GitHub,它似乎比MS Azure更稳定。

在一些特殊时期会比较慢
MS Azure应该够了

@sandy081 sandy081 modified the milestones: March 2020, April 2020 Apr 1, 2020
@rafee

This comment has been minimized.

Copy link

@rafee rafee commented Apr 1, 2020

I started using the settings sync from vscode-insiders. But I immediately ran into a problem. When I try to sync settings across vscode-wsl and visual studio online, I can't use an environment variable to fix folder names for certain workspace folders, such as leetcode. I tried setting "leetcode.workspaceFolder": "${env:HOME}/go/src/github.com/rafee/leetcode", but it doesn't work. This is previously referred at #2809

@sandy081

This comment has been minimized.

Copy link
Member

@sandy081 sandy081 commented Apr 2, 2020

It is not recommended to sync path specific settings unless the extension owning this setting can handle them with env variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.