How to move line up in Mac for Sublime Text?

  • Command+Ctrl+Up

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

  • Option+Up

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" },
]

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.


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