Repository navigation
Closed
Labels
feature-requestRequest for new features or functionalitykeybindingsVS Code keybinding issuesverification-neededVerification of issue is requestedverifiedVerification succeeded
Milestone
Description
I have a company issued OSX machine, linux boxes and windows machines all of which I do dev work on, moving back and forth, I try to keep my settings in sync, it would be very nice to have an operating specific syntax for the keybindings file, much how tasks.json does.
{
"version": "0.1.0",
"windows": [
{
"key": "win+b",
"command": "workbench.action.tasks.build"
},{
"key": "win+d",
"command": "workbench.action.tasks.terminate"
}
],
"osx": [
{
"key": "cmd+b",
"command": "workbench.action.tasks.build"
},{
"key": "cmd+d",
"command": "workbench.action.tasks.terminate"
}
]
}Or better yet in line with #871 ...
{
"windows": [
{
"key": "win+b",
"command": [
"workbench.action.tasks.terminate",
"workbench.action.tasks.build"
]
},{
"key": "win+l",
"command": "workbench.action.tasks.showLog"
}
],
"osx": [
{
"key": "cmd+b",
"command": [
"workbench.action.tasks.terminate",
"workbench.action.tasks.build"
]
},{
"key": "cmd+l",
"command": "workbench.action.tasks.showLog"
}
]
}
For that matter it would be wonderful to have this ability for all of the user configurable settings
Reacted by Felix Haus, Ozlet, Josh Einstein, Geir Sagberg, Mikkel Aunsbjerg Jakobsen, Nathan Janke, DD, Nicholas Nadeau, Ph.D., P.Eng., Christian Studer, Andrea Mignone and 20 more
Reacted by Waseem Dahman
Metadata
Metadata
Assignees
Labels
feature-requestRequest for new features or functionalitykeybindingsVS Code keybinding issuesverification-neededVerification of issue is requestedverifiedVerification succeeded
Activity
alexdima commentedon Jul 11, 2016
tasks.jsonis sitting in the workspace (presumably also checked in a git repo...), thus its need to support different values across different Operating Systems.keybindings.jsonorsettings.jsonare local to the user, since that's where more personal things should stay (i.e. not shared with the team).I would personally not complicate the structure for the majority of users that don't need to jump across Operating Systems, I would go for something like
keybindings.osx.json,keybindings.linux.json,settings.win.json, etc, which would overimpose the variants without the OS in their filename.Benjamin Pasero (@bpasero) Martin Aeschlimann (@aeschli) Johannes Rieken (@jrieken) - You are also heavy cross OS users and share the ownership of the config service. Thoughts?
[-]Operating Specific Keybindings[/-][+]OS Specific Keybindings[/+]alexejk commentedon Nov 25, 2016
I'm hitting the same issue where I would like to sync my settings cross machines, including Windows and OSX machines. The only thing that currently is not working well for me is keybindings.
It would be great to provide an option in user-specific keybinds to set "this is only valid for Windows".
Instead of scoping all of the keybindings, I agree that it makes more sense to allow creation of user-specific keybindings per platform in different files (so besides normal
keybindings.json) have something likekeybindings.osx.json.Just as a thought, another option is introducing a
platformproperty in the keybind itself or ability to havewhenproperty handle platform, e.gosWinOnly or!osOSX` or something in this style. But I personally like the idea of platform files.bjornhanson commentedon Aug 21, 2017
I've been syncing my settings between Linux and OS X and am trying to resolve an issue where I'm loading custom CSS but the path picked up in the settings file by
~/or$HOMEdon't seem to point to the same thing on the OS (might have to do with how I'm launching it in Linux). This might be something I can figure out, but in general I could see it being really nice to have any settings setup to be OS-specific, not just key bindings.repentsinner commentedon Jan 25, 2018
We've run into a similar issue with Python .venv support, where the pythonPath differs by OS but is otherwise seems sensible to store in the repo with other things that should be shared.
Thanks for considering!
Tyriar commentedon Apr 16, 2018
Here's my keybindings.json file, my dotfiles script symlinks that to the correct directory on each platform https://github.com/Tyriar/dotfiles/blob/master/modules/vscode/config/keybindings.json
Some of the keybindings don't make sense on mac in particular, for example this one which makes ctrl+k a chord on macOS:
Something like this would be sufficient for me without complicating the structure:
wavebeem commentedon Apr 16, 2018
rthomazel commentedon Jul 22, 2018
I'd like for this feature to exist as well, mostly to integrate better with windows. I use vscode across Mac, Linux and Windows and my issue is with the
git.pathsetting.gandalfsaxe commentedon Jul 23, 2018
Leaving settings.json as platform agnostic and making os-specific files that can be shared on all OSs for convenience, but only applied on their target platform seems like a good idea.
Add context keys for platforms
Add context keys for platforms (#54894)
gandalfsaxe commentedon Aug 7, 2018
Good implementation. Thanks!
jrieken commentedon Aug 28, 2018
verified via code review
Add OS when contexts