Sublime Forum

Keyboard Shortcuts for Moving or Copying the current line

#1

Hello,

I can’t find this in the keymap file.
Is it possible to have, like in Eclipse, ALT+UP or ALT+DOWN to move a selection or current line up or down?
Or CTRL+ALT+UP or CTRL+ALT+DOWN to copy the current selection or the current line above or below the selection or line?

Thanks.

0 Likes

#2

Edit > Line > Swap Line Up/Down.

0 Likes

#3

Ah yes:

CTRL+SHIFT+UP/DOWN
CTRL+SHIFT+D -> no direction, but works.

Thanks.

0 Likes

#4

This shortcut trigger mission control on Lion. I disabled this shortcut for Lion, but now ctrl-shift-up/down just starts me into multiple cursor mode. How can I move a chunk of text up or down. ‘D’ is broken in Vintage mode, so I am really missing this ability.

0 Likes

#5

On a Mac you use Ctrl+Super+Up/Down to swap lines. In general you want to take a close look at Preferences > Key Bindings - Default to see all the good stuff that’s available.

0 Likes