This question was answered here in the Sublime Text forum, with contributions from jps, tobia, adzenith, and others.
The best way to achieve this is adding the following keybindings to your .sublime-keymap
file, which can be opened via Preferences -> Key Bindings in the top menu. You don't need to install any Packages.
{
"keys": ["alt+up"],
"command": "move",
"args": {
"by": "stops",
"empty_line": true,
"forward": false
}
},
{
"keys": ["alt+down"],
"command": "move",
"args": {
"by": "stops",
"empty_line": true,
"forward": true
}
},
{
"keys": ["alt+shift+up"],
"command": "move",
"args": {
"by": "stops",
"empty_line": true,
"forward": false,
"extend": true
}
},
{
"keys": ["alt+shift+down"],
"command": "move",
"args": {
"by": "stops",
"empty_line": true,
"forward": true,
"extend": true
}
},
On Linux, the select_lines
command to create multiple carets is already bound to "alt+shift+up/down" by default, so you need to remap it if you want to avoid losing that shortcut. I recommend "alt+control+up/down" which is unused by default.
{
"keys": ["alt+control+up"],
"command": "select_lines",
"args": { "forward": false }
},
{
"keys": ["alt+control+down"],
"command": "select_lines",
"args": { "forward": true }
}
The situation might be different on Windows and OSX. If you have info on that, please leave a comment and I'll update the answer!