same as the settings.json, I should be able to specify a local keybindings.json that overrides user keybindings and global keybindings.
A prompt alerting the user to the override and asking which to use might be appropriate.
seems like a duplicate of https://github.com/Microsoft/vscode/issues/4504 where an extension was suggested instead
I found thru https://stackoverflow.com/questions/48945319/a-keybindings-json-per-workspace-in-visual-studio-code
also:
I believe this issue attempts to address part of the reasoning used to dismiss issue #4504: this issue requests an alert noting when local keyboard shortcuts would be overwritten by workspace-specific shortcuts. As to the "win+" vs "cmd+" argument, these keys should simply be synonymous for obvious reasons.
I would also like to see this feature, not simply for team sharing (as noted in the other issue), but also so I can easily move from one computer to another, sharing the Workspace via a cloud, and have the same shortcuts easily available.
Finally, users can build shortcuts that are primarily designed for a given project/workspace. This feature would allow a clear distinction between general, user-defined shortcuts and workspace-specific shortcuts while alerting a user when his or her settings are being overwritten (and perhaps allow the user to prevent this?).
Thanks for your time and effort!
Another strong argument in favor of this feature is tasks. If I can't define tasks globally, why force me to assign keyboard shortcuts to them in exactly such way.
Consider a task called "Foo" and the following keybindings.json content:
{
"key": "ctrl+h",
"command": "workbench.action.tasks.runTask",
"args": "Foo"
}
The same combination of keys can now trigger entrirely different behavior across several workspaces.
@davidstraka2 Yes in multiple workspaces my keys trigger different tasks! Drives me crazy...
There should be consistency between the different config files.
This feature would be appreciated because adding some key bindings (or disabling them cough https://github.com/Microsoft/vscode/issues/60711) are very helpful to share across team members / desktops / laptops in the same way we standardize other settings. Creating a custom extension is a doable workaround but adds significant overhead, compared with the way other workspace settings can be defined.
For me, it is about the Run Tests task. You have Cmd+Shift+B for the Build task. It appears that you removed the Cmd+Shift+T keystroke for the Run Tests tasks. I want to ensure that those two keystrokes are consistant within my organization. Honestly, I should be able to define the keystroke when I define the task but, failing that, have a way to "bake" it into the project. i.e. Allow me to add a keybindings.json file in the .vscode directory or let me add the keybindings json snippet to the settings.json file (or some other mechanism). I just need an easy/consistant way to run our Test task.
Most helpful comment
Another strong argument in favor of this feature is tasks. If I can't define tasks globally, why force me to assign keyboard shortcuts to them in exactly such way.
Consider a task called "Foo" and the following keybindings.json content:
The same combination of keys can now trigger entrirely different behavior across several workspaces.