I wanted to remap one of the key bindings for selecting a paragraph / expanding the current selection – but just in the Ruby syntax. Here’s what I added to my `Default (OSX).sublime-keymap` file:
// when using ruby syntax, set cmd+shift+b to run “expand selection to indentation (or paragraph)”
{
“keys”: [“super+shift+b”],
“command”: “expand_selection”,
“context”: [ { “key”: “selector”, “operator”: “equal”, “operand”: “source.ruby” } ],
“args”: {“to”: “indentation”}
// “args”: {“to”: “paragraph”}
},
// when not using ruby, set that shortcut to “expand selection”
{
“keys”: [“super+shift+b”],
“command”: “expand_selection”,
“context”: [ { “key”: “selector”, “operator”: “not_equal”, “operand”: “source.ruby” } ],
“args”: {“to”: “scope”}
},