Create Duplicate Line Visual Studio Code (above or below) Example


Add Duplicate line above or below VS Code

If you want to create a duplicate line in Visual Studio Code, make use of the below keyboard shortcuts,



To create a duplicate line above the current line

Key the cursor on the line you want to duplicate,

Windows: Shift + Alt + Up Arrow Key ↑
Mac: Shift + ⌥ Option + Up Arrow Key ↑
Linux: Control + Shift + Alt + Up Arrow Key ↑


To create a duplicate line below the current line

Key the cursor on the line you want to duplicate,

Windows: Shift + Alt + Down Arrow Key ↓
Mac: Shift + ⌥ Option + Down Arrow Key ↓
Linux: Control + Shift + Alt + Down Arrow Key ↓

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org



















Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap