VS Code Keyboard Shortcuts for Mac, Linux & Windows

Visual Code is a popular source-code editor and the first to accommodate cross-platform IDE applications. It offers several keyboard shortcuts to help programmers like you maximize efficiency. Read on to learn some of the most useful keyboard shortcuts to help boost your productivity.

VS Code Keyboard Shortcuts for Mac, Linux & Windows

VS Code Keyboard Shortcuts for Mac

The following VS code keyboard shortcuts are designed to help you save time as you code from your Mac.

Quick Open

Use the “CMD + P” shortcut to open your files quickly. Then go through your files using the down and up

arrow keys. Hit the right arrow key once you’ve found the file you wish to open. Every time you open new files, open files will move to the background of your screen.

Command Palette

Using the Command Palette, you can conveniently access the file commands you want that correspond to your current coding context. You’ll just need to enter a keyword that relates to it instead of searching through menus.

Use the “CMD + SHIFT + P” shortcut to access the Command Palette.

Toggle the Sidebar

You can toggle the sidebar with the “CMD + B” shortcut to switch between the full width or hide the editor view.

Multi-Select Cursor

If you need to change all your H3 tags to H4, for example, you don’t need to change each instance manually. You can use the multi-select feature to select all instances of the thing you wish to change and change them all at once. To use the shortcut, you just need to select one of the tags, and then use “CMD + D.”

This will find all instances of the selected tag and then display an active cursor for further action.

Comment Code Block

Commenting code is a must and is done frequently. Enter “SHIFT + OPT + A” to comment out the lines of code.

Copy Line

When programming, you may need to copy lines of code to paste elsewhere in your project. Use the “OPT + SHIFT + UP”

or
“OPT + SHIFT + DOWN”

shortcuts to do this quickly.

Show All Symbols

If you need to see all functions, files, classes, etc., use the “CMD + T”

shortcut. This will launch a Reference view displaying your code’s symbols. This shortcut is similar to global find but works with symbols instead.

VS Code Keyboard Shortcuts for Windows

Use the following Visual Code shortcuts in Windows to help reduce time spent going through different menus to access features.

Quick Open

Use the “CTRL + P” shortcut as a quick way to open files. Then use the down and up arrow keys to find

the file(s) you want, and hit the right arrow key once you’ve found it. When you open new files, the opened files will move to the background of your screen.

Command Palette

Use the “CTRL + SHIFT + P”

shortcut to launch the Command Palette. The Command Palette is a convenient way to access the file commands relevant to the current context. Once the Command Palette is opened, you just need to type in the keyword related to the command you’re looking for, saving you time looking through menus.

Toggle the Sidebar

Switch between the full width or hide the editor view by toggling the sidebar. Use the “CTRL + B” shortcut to do this.

Multi-Select Cursor

If, for example, you need to change all your tags from H2 to H3, you can use the multi-select feature to change all instances at once. On Windows, select one of the tags you want to change, then enter “CTRL + D.”

VS finds all instances of the selected tag and then displays the active cursor for further action.

Comment Code Block

Commenting blocks of code is a necessity and one of the most common actions performed when coding. For a multi-line comment use “SHIFT + ALT + A”.

For a single line, it’s

“CTRL + K + C.”

Copy Line

The option to move lines of code around by copying and pasting it is another common action. Use the “SHIFT + ALT + UP”

or “SHIFT” + ALT + DOWN”

shortcuts to do this.

Show All Symbols

To launch a Reference view displaying all your code’s symbols, i.e., functions, classes, files, etc., use the “CTRL + T”

shortcut. This shortcut is like the global find feature for symbols.

VS Code Keyboard Shortcuts for Linux

If you’re coding from a Linux computer, consider using these shortcuts for speed and efficiency.

Quick Open

Enter “CTRL + P” for quick access to your files.

Then use the up and down arrow keys to browse through them. Press the right arrow key once you’ve found the file you want to open. Your most recent files will be brought to the front of your screen, while previously opened files will move to the back.

Command Palette

To launch the Command Palette, use the “CTRL + SHIFT + P”

shortcut. Once opened, you can access the file commands relevant to your current coding context. You’ll just need to enter a keyword related to the command you want.

Toggle the Sidebar

You can toggle the sidebar using the “CTRL + B”

keyboard shortcut to switch between the full-width view or hide the editor.

Multi-Select Cursor

If you need to replace all your tags from one type to another, you can use the multi-select feature to change all instances at once. Using Linux, select the tag you wish to change, then use the “CTRL + D”

shortcut. All instances of the selected tag will be found and highlighted; then the active cursor will be displayed, awaiting further action.

Comment Code Block

Commenting blocks is another essential part of coding; therefore, one of the most common actions performed. To comment out a block of code, use the “SHIFT + ALT + A”

shortcut, and for a single-line use “CTRL + K + C.”

Copy Line

To move lines of code around your program use the “SHIFT + ALT + UP”

or “SHIFT” + ALT + DOWN”

shortcut keys.

Show All Symbols

To open a Reference view with all your code’s symbols, i.e., classes, functions, files, etc., use the “CTRL + T”

shortcut. This shortcut is like the global find feature for symbols.

Shortcuts Every Developer Should Know

Programmers use Visual Studio Code to develop commercial or personal apps. Coding is brain-intensive and requires focus and attention to detail. One of the ways VS helps to assist programmers to save time and, in turn, boost their productivity is through shortcuts. VS has configured shortcuts to allow you to access and use the most common features from the screen you’re currently working on.

Which shortcut(s) do you find the most useful? Share your opinions in the comments section below on how effective you think Visual Studio is in encouraging productivity.

Disclaimer: Some pages on this site may include an affiliate link. This does not effect our editorial in any way.

Todays Highlights
How to See Google Search History
how to download photos from google photos