Closed greggilbert closed 6 years ago
@greggilbert Can you please open your keybindings.json
file and check if there are any errors in that file.. you can open that file from the keybindings editor or through the global command Open Keyboard Shortcuts File
@sandy081 I tried clearing out my keybindings and I was able to save. The issue is that there was a trailing comma in what I had there:
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "shift+cmd+left", "command": "workbench.action.previousEditor"},
{ "key": "shift+ctrl+tab", "command": "workbench.action.previousEditor"},
{ "key": "cmd+1", "command": "workbench.action.openEditorAtIndex1" },
{ "key": "cmd+2", "command": "workbench.action.openEditorAtIndex2" },
{ "key": "cmd+3", "command": "workbench.action.openEditorAtIndex3" },
{ "key": "cmd+4", "command": "workbench.action.openEditorAtIndex4" },
{ "key": "cmd+5", "command": "workbench.action.openEditorAtIndex5" },
{ "key": "cmd+6", "command": "workbench.action.openEditorAtIndex6" },
{ "key": "cmd+7", "command": "workbench.action.openEditorAtIndex7" },
{ "key": "cmd+8", "command": "workbench.action.openEditorAtIndex8" },
{ "key": "cmd+9", "command": "workbench.action.openEditorAtIndex9" },
]
The keybindings file worked just fine with the final comma there, so I guess it just doesn't work when trying to add a keybinding to that sort of list?
@greggilbert Yes, we bail out if there are any errors in keybindings file while writing into it from keybindings editor. It's same in settings. But we ignore trailing comma which is not the case here.
Will make it resilient for trailing comma case.
Steps to Reproduce:
Open Next Editor
shortcut and set it toctrl+tab
Error 'Error: Unable to write keybindings. Please open Keybindings file to correct errors/warnings in the file and try again.' while editing keybinding. Please open
Reproduces without extensions: Yes