Currently you can either have different files for each OS or “one to rule them all”.
The problem with the first option is that, if you want to target all three OS architectures, you need to do your changes three times (one is slightly different).
The problem with the second option is that OSX bindings are different in that they use super instead of ctrl.
I have the following suggestions to allow for a centralized format:
Example:
{ "keys": "primary+x"], "command": "cut" },
{ "keys": "primary+c"], "command": "copy" },
{ "keys": "primary+v"], "command": "paste" }
]
-
The “primary” key modifier. Maps to “ctrl” on Windows+Linux and “super” on OSX. It was first mentioned in some ST changelog and the terminology makes sense imo.
-
The “keys” key in a key bindings entry can also be a mapping that specifies which OS the value (with the key chords) should be active on. This would be nice if it supported to specify two OSes in a key so that you don’t have to duplicate the chords for Windows&Linux.
Example:
{ "keys": {"osx": "ctrl+c"], "*": "ctrl+break"]}, "command": "exec", "args": {"kill": true} }
]
The name for a key bindings file like this could then be arbitrary or follow the old convention of Default.sublime-keymap
. Since this only has additions to the current format it would not be a breaking change either.