code-settings-sync
code-settings-sync copied to clipboard
keybindings.json not syncing
🐛 Describe the bug
I uploaded my custom VSCode keyboard shortcuts from one computer and tried to use sync settings to download the same keyboard settings onto a second computer. This is what I got on the second computer after sync settings processed.
keybindings.json:
// Place your key bindings in this file to override the defaults
[
]
🌴 Visual Studio Code Version : 1.43.2 🌴 Code Settings Sync Version : 3.4.3 🌴 Standard or Insiders : Standard 🌴 Portable or Installed : Installed 🌴 OSS or Official Build : Official Build 🌴 Operating System : macOS 10.15 Catalina 🌴 Occurs On: Sync 🌴 Proxy Enabled: No 🌴 Gist Id: ca5bac8864a6c00bc671157a3dcd984a
📰 To Reproduce Steps to reproduce the behavior:
- Customize shortcut keys on a Windows computer. For example, remap Control+L to navigate by line number.
- Upload settings to Gist with sync settings plugin.
- On a macOS computer, install the sync settings plugin. Download settings.
- On the mac, open the shortcuts
keybindings.jsonfile.
💪 Expected behavior
All shortcut settings transferred from the Windows computer to the macOS computer exactly as written in the keybindings.json shortcuts file on Windows.
I happened to select generic, BM PC compatible keyboard shortcuts for my keybindings.json file, but I would expect the settings to be preserved across computers even if I chosen Windows-specific shortcuts, or macOS-specific shortcuts, or Linux-specific shortcuts, and so on.
Same here. When I download settings to my MacBook using this extension, everything is included except keybindings.json, which is empty. It works fine between Windows and Linux, so I'm guessing there's some logic in this extension or in VSCode that separated macOS keybindings from other platforms, because of the different keyboard layout.
This prompted me to test the official settings sync feature in VSCode, which has the setting "settingsSync.keybindingsPerPlatform". When set to false, my keybindings are successfully synced between all my PCs, including my MacBook.
@Hubro Did you have to sync both machines, or just the one where you're trying to download the keybindings settings after setting settingsSync.keybindingsPerPlatform to false?
I don't have access to the machine I uploaded te keybinding settings currently, so I can't trigger that with this new setting settingsSync.keybindingsPerPlatform. And downloading of the settings does not happen after changing the setting and triggering a sync :(
@Hubro Did you have to sync both machines, or just the one where you're trying to download the keybindings settings after setting
settingsSync.keybindingsPerPlatformtofalse?I don't have access to the machine I uploaded te keybinding settings currently, so I can't trigger that with this new setting
settingsSync.keybindingsPerPlatform. And downloading of the settings does not happen after changing the setting and triggering a sync :(
Good question, I don't remember. Presumably you need to set it on the machine where you first uploaded the keybindings.
Hello. I think I hit this as well or a variant of it. I'm in the process of trying to move from computer 1 to computer 2. Both have vscode setting sync enabled. It seems after I opened one computer, it's settings over-wrote the other. Here's what I observed:
Computer 2: Map CTRL+P to "workbench.action.quickOpen". It works for a while. Computer 1: Open a file with vscode to see it's contents. Computer 2: When I moved back to this computer, I tried using CTRL+P but it was gone. Suspiciously it also showed me a "Last synced: now" in the UI (but I'm realizing that might be a false indicator as it seems to always say that).
Opportunity/Idea for versioned settings?
When it first happened I was hoping/guessing that the settings might be versioned and I could see how they changed and rollback. Regarless of the outcome of this issue/investigation. I believe the ability to have versioned settings or some kind of a history would be useful. It might not prevent this situation, but it would make it much easier and faster to recover. Even if it's only versioned locally and only accessible on disk (i.e. no sort of history/ui browser) it could help.
Changing the "universalKeybindings" setting to true in syncLocalSettings.json fixed this issue for me.
I am also having this issue. My "main" computer is a Windows 11 PC at home. I recently synced my settings to a Windows 10 work computer just fine. However, when I synced my settings on macOS Big Sur, the keyboard shortcut settings did not sync at all.
@ytrinh Can you point how to navigate to this file? I cannot find this file or setting anywhere.
@bmitc The location on my MBP is "~/Library/Application Support/Code/User".
@Hubro Did you have to sync both machines, or just the one where you're trying to download the keybindings settings after setting
settingsSync.keybindingsPerPlatformtofalse?I don't have access to the machine I uploaded te keybinding settings currently, so I can't trigger that with this new setting
settingsSync.keybindingsPerPlatform. And downloading of the settings does not happen after changing the setting and triggering a sync :(
I think I just ran into this same issue just now, trying to sync keybindings.json from my macbook to my ubuntu VM, in vscode 1.70. I set "settingsSync.keybindingsPerPlatform": 'false'" on both machines, and within a minute or so I had my bindings synced on my Ubuntu VM from my macbook.