I'm trying to use the swap line keyboard shortcuts in sublime text 2.
I'm holding down command, ctrl, and up and down keys, but they're not doing anything.
Using the edit menu item works though. I'm using a small mac keyboard. What could be the problem thanks.
[{ "keys": ["ctrl+super+up"], "command": "swap_line_up" }, { "keys": ["ctrl+super+down"], "command": "swap_line_down" } ]
Sublime Text works with all the standard Windows shortcuts: In addition to the arrow keys, home, end, page up, etc, there is: Ctrl+Left / Ctrl+Right: Move by words. Ctrl+Home / Ctrl+End: Move to the beginning / end of the file. Ctrl+L: Expand selection to line.
CTRL-SHIFT-UP (PC) or CTRL-⌘-UP (Mac) moves a line up, while CTRL-SHIFT-DOWN (PC) or CTRL-⌘-DOWN (Mac) moves a line down.
Alternatively you can select lines and go to SELECTION MENU >> SPLIT INTO LINES. Now you can edit multiple lines, move cursors etc. for all selected lines.
cmd + ctrl + ⇧/⇩ on OS 10.8 running sublime text 2 do swap lines for me, by default. I did not need to bind any specific keys, nor does it appear to have any other function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With