How to move line up in Mac for Sublime Text?

19,852

Solution 1

According to https://docs.sublimetext.io/reference/keyboard_shortcuts_osx.html, it should be Command+Ctrl+Up.

  • ⌘ = Command
  • ⇧ = Shift
  • ⌥ = Option (a.k.a. Alt)
  • ⌃ = Ctrl
  • ⎋ = Esc
  • ↩︎ = Return
  • ⌫ = Delete (a.k.a. Backspace)

See also https://apple.stackexchange.com/questions/42615/is-there-a-list-of-menu-shortcut-icons for the meaning of the symbols.

Solution 2

I could not track down what was causing the key binding collision, so I set user key bindings in Sublime Text to an alternative. To do this, open Sublime Text. In the top menu navigate to Sublime Text > Preferences > Key Bindings then add these hashes to the array with the alternative key binding of your choice:

[
    { "keys": ["ctrl+alt+shift+super+up"], "command": "swap_line_up" },
    { "keys": ["ctrl+alt+shift+super+down"], "command": "swap_line_down" },
]

Solution 3

"control" + "cmd" + up (in Mac)

Solution 4

  • Command+Ctrl+Up

In a Visual Studio Code, configured with Sublime Text Keymaps, you can also use:

  • Option+Up
Share:
19,852
Aurimas
Author by

Aurimas

Web developer passionate about smooth user experience.

Updated on June 20, 2022

Comments

  • Aurimas
    Aurimas about 2 years

    On OS X when I use the shortcut provided in documentation (⌘ + ⌃ + Up which I read as Command + Shift + Up) Sublime Text selects the text instead of moving the line up. Am I missing something?

  • Gonzalo Garcia
    Gonzalo Garcia almost 5 years
    Option + Up won't move the line up