VS CODE

Shortcuts

Most used

For Developers

VS CODE

Visual Studio Code is one of the most widely used and recommended editors because of its excellent features, powerful extensions,  and all-in-one editor which allows writing code in any programming  language.

VS CODE

It presents to you every functionality, shortcut, and configuration options in the form of a searchable list.

Command Palette

Windows:  Ctrl+Shift+P

Mac:  Cmd+Shift+P

VS CODE

If you want to search for a piece of text in all your current project files, VS Code allows you to do that by either clicking the Search icon on the sidebar or by using keyboard shortcut:

Search Files

Windows:  Ctrl+Shift+F

Mac:  Cmd+Shift+F

VS CODE

Zen mode is a distraction-free view, allowing you to focus completely on your code and hide all the toolbars and buttons.

Zen Mode

Windows:  Ctrl+K Z

Mac:  Cmd+K Z

VS CODE

Multiple cursors in VS code are great time savers when you want to make the same edits at multiple places. You can add cursors above/below the current line by the shortcut keys:

Add multiple cursor

Windows:  Ctrl+Alt+Up/Down

Mac:  Cmd+option+Up/Down

VS CODE

Instead of using click and drag to select the text, you can go for various shortcuts that enhance both speed and precision. One such shortcut allows you to expand your selection word by word.

 Select text word by word

Windows:  Ctrl+Alt+Left/Right

Mac:  Cmd+option+Left/Right

VS CODE

Want to move a certain piece of code to a different place in the current file? Skip the usual Cut-Paste and simply move the current line or selection up/down by using this shortcut:

Move Line Up/Down

Windows:  Alt+Up/Down

Mac:  Option+Up/Down

VS CODE

You can quickly delete the current line in one go instead of having to press the backspace or select the whole line. Use the following shortcut to achieve that:

Delete Line

Windows:  Ctrl+Shift+k

Mac:  Cmd+Shift+k

VS CODE

Commenting out old code to test some newly written lines of code? VS Code can make the whole process much simpler by allowing you to turn multiple lines into comments at once.

Comment Lines

Windows:  Ctrl+/

Mac:  Cmd+/

VS CODE

Need more screen space? With this shortcut, you can quickly expand/collapse the sidebar when not in use.

Toggle Sidebar

Windows:  Ctrl+/

Mac:  Cmd+/

VS CODE

Writing well formatted and readable code is a recommended practice. But all of us have been in situations where doing so manually just isn’t feasible. VS Code allows you to quickly format your code as well. 

Code Formatter

Windows:  Ctrl+Alt+F

Mac:  Control+Option+F