Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Move a Line Up or Down in Visual Studio Code for Mac

I'm familiar with how to move a line up or down in other editors, like Atom and Sublime.

How is this done in Visual Studio Code for Mac?

like image 795
jacefarm Avatar asked Oct 16 '17 17:10

jacefarm


3 Answers

In Visual Studio Code for Mac...

To move a line UP: + (alt + up arrow key)

To move a line DOWN: + (alt + down arrow key)

See here for a reference on Basic Editing Key Bindings in Visual Studio Code.

like image 87
jacefarm Avatar answered Nov 07 '22 13:11

jacefarm


For Windows:

  • To move a line UP: Alt + (alt + up arrow key)
  • To move a line DOWN: Alt + (alt + down arrow key)
like image 20
tapu74 Avatar answered Nov 07 '22 13:11

tapu74


In Visual Studio Code for Mac for me it is:

To move a line UP: +shift+ (alt + shift + up arrow keys)

To move a line DOWN: +shift+ (alt + shift + arrow down keys)

I do have IntelliJ IDEA Keybindings installed.

like image 10
Anima-t3d Avatar answered Nov 07 '22 14:11

Anima-t3d