Work Faster in Visual Studio Code with Shortcuts

Boost your productivity in VS Code by mastering these essential keyboard shortcuts. Learn how to code faster, navigate quicker, and streamline your workflow today.

Here are 10 Shortcuts to work more efficiently in Visual Studio Code.

Move a Line of Code Without Copying and Pasting in VSCode

Option + Up/Down Arrow will allow you to relocate a line of code with your cursor. Think of a dog on a leash and the keybinding is your leash to carry your code or dog up or down your file. This is useful when you are reordering your code.

Pro Tip: If you highlight several lines of code you can use this command to move all the lines at once.

Jump to the ends of your file in VSCode

Command + Up/Down Arrow will allow you to quickly jump to the top or bottom or your file with your cursor. This is useful when you have a big file and prevents you having to scroll.

Create multiple cursors in your VSCode project

Option + Command + Up/Down Arrow will allow you to add multiple cursors to your file and type on multiple lines at the same time. This is useful when you need to create lists such as a navigation menu.

Duplicate your code quicker in VSCode

Shift + Option + Up/Down will allow you to copy a line of code and place it above or below the line you are copying. Highlighting multiple lines will allow you to copy & paste an entire section of code.

How to delete code faster in VSCode

Command + Shift + K will allow you to quickly delete a line of code. Highlight multiple lines will allow you to delete an entire section of code (although you could just hit the delete key at that point).

How to quickly add a comment in VSCode

Command + / will allow you to quickly comment or uncomment a line of code or create a comment block for you to type a note.

How to quickly search for a file in VSCode

Command + P will allow you to quickly search for a file in the search bar. This is useful when you have multiple files.

How to quickly open and close the sidebar in VSCode

Command + B will allow you to open and close the sidebar

How to quickly open and close the terminal window in VSCode

Command + ` will all you to open and close the terminal window

How to quickly format your document in VSCode

Shift + Option + F will allow you to format your code. To automatically format your code on each save check out How to Automatically Format and Align Code in VS Code with Prettier

No fluff. Just real projects, real value, and the path from code to cash — one useful build at a time.

© 2025 Matthew Seiwert