One feature I find very useful in a text editor is the ability to move a line or a group of lines up or down with a keyboard shortcut. I discovered this possibility in Sublime Text and now I want it in all my editors.

Visual Studio Code supports this action with the Alt+Up and Alt+Down keyboard shorcuts.

Visual Studio Code Free Download

Visual

Visual Studio Copy Line Down

Move Code Alt+Up/Down. This keyboard shortcut is new in Visual Studio 2013. Microsoft Visual Studio Code - How to Move and Copy LinesIn this video I will show you how to manipulate line inside VS Code using key bindings so you can mo.

Use the Sublime Text shortcuts

If you are used to Sublime Text and your brain is wired to the Ctrl+Shift+Up and Ctrl+Shift+Down shortcuts, Visual Studio Code can be configured. Note that those shortcuts are used by default for the cursorUpSelect and cursorDownSelect commands but those are also accessible from Shift+Up and Shift+Down.

Visual studio code move line up

Visual Studio Code Tutorial

  1. Open the keyboard shortcuts configuration (File > Preferences > Keyboard Shortcuts).
  2. In the keybindings.json file on the right side, add the following bindings:

  3. Save the file and enjoy!