VS Code Keyboard Shortcuts for Mac, Linux & Windows. Visual Code is a popular source code editor and the first to support IDE applications that run on different platforms. For programmers like you, it provides many keyboard shortcuts. To help you boost your productivity, read on to learn some of the best keyboard shortcuts.
VS Code Keyboard Shortcuts for Mac
To help you save time while using VS Code on your Mac, check out the keyboard shortcuts listed below.
Quick Open
Use the “CMD + P” shortcut to open files quickly. Then use the down and up arrows to navigate through your files.
Arrow keys. Once you’ve located the file you want to open, press the right arrow key. The background of your screen will move to the left every time you open a new file.
Command Palette
Using the Command Palette, you can easily access the file commands relevant to your current coding context. Instead of looking through menus, you must enter a keyword that fits.
Press the “CMD + SHIFT + P” shortcut to access the Command Palette.
Toggle the Sidebar
To toggle between the full-width editor view and the sidebar, use the “CMD + B” shortcut.
Multi-Select Cursor
If you need to change all of your H3 tags to H4, for example, you don’t have to adjust each instance manually.
Select all instances of the thing you want to change at once using the multi-select feature. To use the shortcut, select one of the tags and press “CMD + D.”
This will find all instances of the selected tag and then show an active cursor for further action.
Comment Code Block
It is essential to comment on Code and is done frequently. To comment out the lines of Code, enter “SHIFT + OPTION + A.”
Copy Line
You may need to copy lines of Code to paste elsewhere in your project. Use “OPT + SHIFT + UP”
or “OPT + SHFT + DOWN”
Shortcuts for completing this quickly.
Show All Symbols
Use “CMD + T” to see all functions, files, classes, etc.
Shortcut. This will launch a Reference view that shows the symbols in your Code. This shortcut is similar to global find but uses symbols instead.
VS Code Keyboard Shortcuts for Windows
In Windows, use Visual Code shortcuts to save time by skipping through menus to access features.
Quick Open
Use the “CTRL + P” shortcut to open files quickly. Then, use the down and up arrow keys to find
The file(s) you want, then hit the right arrow key. The previously opened files will move to the background of your screen when you open new files.
Command Palette
Use the “CTRL + SHIFT + P” combination.
Launch the Command Palette with this shortcut. Accessing the file commands pertinent to the current situation is made simple by the Command Palette. Once the Command Palette is opened, all you have to do to find the command you’re looking for is type in the associated keyword. This will save you time from having to look through menus.
Toggle the Sidebar
Toggle the sidebar to show or hide the editor view. To do this, use the “CTRL + B” shortcut.
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.”
The active cursor is shown after VS has found all instances of the selected tag.
Comment Code Block
One of the most common things done when coding is commenting out code sections. Use “SHIFT + ALT + A” to create a multi-line comment.
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
Use “CTRL + T” to open a Reference view with all your Code’s symbols, such as classes, functions, files, etc.
Shortcut. This shortcut is similar to 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” to quickly access your files..
Then, to look through them, use the up and down arrow keys. Once you’ve located the file you want to open, press the right arrow key. Your most recently opened files will move to the front of your screen, while your older files will move to the back.
Command Palette
Use “CTRL + SHIFT + P” to launch the Command Palette.
Shortcut. The active cursor will then be shown, awaiting further action after all instances of the selected tag have been located and highlighted.
Toggle the Sidebar
Using “CTRL + B,” you can toggle the sidebar.
Use the keyboard shortcut to switch between the full-width view and hide the editor.
Multi-Select Cursor
You can use the multi-select feature to change all instances at once if you need to change all your tags from one type to another. Use “CTRL + D” to select the tag you want to change in Linux.
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 on blocks is another essential part of coding and one of the most common things done.Using “SHIFT + ALT + A” will comment out a code block.
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 create commercial or personal apps using Visual Studio Code. Focus and attention to detail are necessary for coding, a mentally taxing activity. One way that VS helps programmers save time and, in turn, boost their productivity is through shortcuts. To help you access and use the most frequently used features from the screen you’re working on, VS has set up shortcuts.
Which shortcut do you find to be the most useful? Comment below with your thoughts on how well Visual Studio helps boost productivity.