Duplicate Line Visual Studio Code



Shortcut

  1. Visual Studio Select Block
  2. Visual Studio Duplicate Row

If you want to easily duplicate a line of code in Visual Studio Code, you can do it with a simple keyboard shortcut. Just use the Copy Line Down (Ctrl+Alt+UpArrow) or Copy Line Up commands (Ctrl+Alt+DownArrow) — depending on where you want the new line inserted with respect to your cursor.

Visual studio select block

For those migrating from WebStorm/PhpStorm, Duplicate lines = CTRL + D Move a line/selection of code Up/Down = Ctrl + Shift + UP / DOWN. Ctrl + Shift + D - Duplicate Before Selection. Ctrl + Alt + Shift + D - Duplicate After Selection. If the key bindings don't work, please check Preferences - Keyboard Shortcuts.

Visual

Adobe dc pro download mac. Welcome to the January 2021 release of Visual Studio Code. There are a number of updates in this version that we hope you will like, some of the key highlights include: Wrap tabs - Wrap editor tabs in the workbench instead of having a scrollbar. Configure tab decorations - Add editor tab status decorations. Another alternative to the accepted answer that I often use is SHIFT ALT DOWN which duplicates the current line to the line below (likewise, SHIFT ALT UP duplicates to the line above). Once you get the copy of your line you can use ALT UP / ALT DOWN to move it wherever you want.

Visual Studio Select Block

You can view all the shortcuts like this in Visual Studio Code by going to the preference settings found at

Visual Studio Duplicate Row

If you want to easily duplicate a line of code in Visual Studio Code, you can do it with a simple keyboard shortcut. Just use the Copy Line Down (Ctrl+Alt+UpArrow) or Copy Line Up commands (Ctrl+Alt+DownArrow) — depending on where you want the new line inserted with respect to your cursor.