Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sublime text swap line keyboard shortcuts

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" }  ] 
like image 724
Harry Avatar asked May 07 '13 05:05

Harry


People also ask

How do I move a line in Sublime Text?

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.

How do I move a line up and down in Sublime Text?

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.

How do I move multiple lines in Sublime Text?

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.


1 Answers

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.

like image 147
Jon Mitten Avatar answered Oct 08 '22 14:10

Jon Mitten