Shortcuts have to be stored in a file called Default.sublime-keymap to be taken into account by Sublime Text.
What if I want to create some shortcuts only for OSX for example?
Well, you can. Just add (<platform>) after the Default. Here are the 3 possibilities:
Default (Windows).sublime-keymapDefault (Linux).sublime-keymapDefault (OSX).sublime-keymapHere is a simple shortcut that runs the command upper_case when you press ctrl+u.
{
"keys": ["ctrl+u"],
"command": "upper_case"
}
I've set the content of my keybindings like this, but it doesn't work!
It's normal! It's because it has to be a list of object (you probably want more than one shortcut, right?). Here's how it should look like:
[
{
"keys": ["ctrl+u"],
"command": "upper_case"
}
]
Now it works!