question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add gist ID from command line to force sync on VSC install

See original GitHub issue

I’m creating bash scripts to allow me setup dev configuration by running few commands.

Currently I’m installing VSC from brew, running code --install-extension Shan.code-settings-sync

And then I want to pass GIST id and force sync on VSC start. However looks like it’s not possible now, as I could understood (https://github.com/shanalikhan/code-settings-sync/issues/465#issuecomment-349903749). Guys, maybe you have any ideas how I could implement it?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
shanalikhancommented, Sep 26, 2019

Check the features on Readme.

https://github.com/shanalikhan/code-settings-sync#features

If you want to do manually see the Global Settings

0reactions
Zireaelcommented, Nov 18, 2019

I’m doing settings sync on first run like this in my Linux docker file with online version of VSCode called code-server. If you change code-server in script below to code, it will work for normal VSCode too.

RUN code-server --install-extension Shan.code-settings-sync

RUN echo "{}" >> /root/.local/share/code-server/User/settings.json

RUN tmp=$(mktemp) && \
  jq -M '. +{ \
  "sync.syncExtensions": true,\
  "sync.autoDownload": true,\
  "sync.gist":"abc123def987",\
  "telemetry.enableTelemetry": false }' /root/.local/share/code-server/User/settings.json > "$tmp" && mv "$tmp" /root/.local/share/code-server/User/settings.json

RUN echo "{}" >> /root/.local/share/code-server/User/syncLocalSettings.json

RUN tmp=$(mktemp) && \
  jq -M '. +{ "downloadPublicGist": true }' /root/.local/share/code-server/User/syncLocalSettings.json > "$tmp" && mv "$tmp" /root/.local/share/code-server/User/syncLocalSettings.json

Basically creating VSCode settings.json and adding gist ID to it using jq and then creating syncLocalSettings.json config with "downloadPublicGist": true. When VSCode (code-server) is opened first time, settings download gets successfully started. If you don’t want auto-download to start, change "sync.autoDownload": true to false

Now I only need to find a way to initialize VSCode first run bootstrap through command line /bash

Read more comments on GitHub >

github_iconTop Results From Across the Web

Settings Sync in Visual Studio Code
You can always change what is synced via the Settings Sync: Configure command or by opening the Manage gear menu, selecting Settings Sync...
Read more >
How to Sync VS Code Settings Between Multiple Devices and ...
Step 1: Install Settings Sync; Step 2: Authorize access to Github; Step 3: Upload your ... Adding Gist ID to Settings Sync configuration....
Read more >
Settings ⚙️ - How to Python in VS Code documentation
Press ctrl+Shift+P to open the command prompt and select Sync: Update/Upload Settings option to upload your settings and save to a github gist....
Read more >
Visual Studio Code Settings Synchronization - Shan Ali Khan
To Install : type “ext install code-settings-sync” ... new window will be opened to allow you to select the GIST or Skip to...
Read more >
Visual Studio code sync settings github gist ID - Stack Overflow
As you can see, there's an URL https://vscode-sync.trafficmanager.net/ that actually is a CNAME to a cloudapp.net domain (at Azure), which is in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found