Visual Studio Code top 10 useful keyboard shortcuts

I'm a software consultant who loves to build projects and share my learnings on this blog.
Search for a command to run...

I'm a software consultant who loves to build projects and share my learnings on this blog.
No comments yet. Be the first to comment.
Azure Functions is a powerful serverless compute platform, and Azure App Service handles a lot of the underlying configuration for you out of the box. However, there are scenarios where you may want t

If you’ve been exploring Azure AI learning paths or watching older demos, you’ve probably run into something confusing: The documentation and training links often reference Foundry (Classic) But the portal you’re using today might show Foundry (New...

In today's digital age, speed is paramount for web and mobile applications. Users expect instantaneous responses, and any delay can lead to a poor user experience and loss of engagement. Therefore, as developers, it's crucial to build web APIs that a...

Loops are fundamental constructs in any programming language. But have you ever wondered if there are any performance differences between them? For small collections, the difference might be negligible, but what about handling a million or 10 million...

When using an Azure Function app, it is necessary to connect it to a storage account, often referred to as Host storage. This storage is utilized by the Functions runtime, as well as by various triggers and bindings to coordinate between multiple run...

Keyboard shortcuts can greatly improve your productivity and are sometimes more helpful than mouse clicks. We will see some of the top 10 keyboard shortcuts that are very powerful and highly useful while using Visual Studio Code. I am gonna talk about the shortcuts for Windows, for Mac, just replace ctrl with cmd key.
Ctrl + bYou can easily open and close the sidebar with Ctrl + b . This really comes in handy when you are on a small screen and would like to save the display area.

Ctrl + pWhen you want to open the recent files or open a specific file, you can use Ctrl + p to get a search bar and open the file from there.
Ctrl + k EnterWhen you open the file by a single click from the sidebar or through the quick open, the file will be replaced by the next file you open. So in case you want to keep open the current file, type in Ctrl + k Enter You can also notice the changes in the file name in the top bar once you "keep open" the file.

Ctrl + ` To quickly open/close the integrated terminal use Ctrl + ` . Integrated Terminal is a really handy tool when you want to execute commands without opening a separate terminal or command prompt.
Alt + Shift + fTo format the entire document you can use Alt + Shift + f . This is really useful when you want to follow same formatting rules across files.

Ctrl + Shift + fWhile Ctrl + f allows you to search within the current file, Ctrl + Shift + f allows you to search within your open folder.
Ctrl + dTo select the entire word where your cursor is on, use Ctrl + d , If you hit Ctrl + d more than once, you’ll add another occurrence of the same keyword to your selection. This is very useful when you want to change the multiple occurrences of the same word.

Ctrl + Shift + LIn case you want to change a particular word or get the cursor across all the occurrences of word or selection use Ctrl + Shift + L. Alternatively, you can also use Ctrl+F2 to get the same behavior.

Ctrl + wClose the open file with this shortcut instead of hovering over the tab finding the 'x' and clicking it. To close all the open files, use Ctrl + k w.

Ctrl + Shift + pOne of the most important feature of VS Code is Command Palette. It lets you execute tasks in VS code. Use Ctrl + Shift + p to bring up the command palette. You can type in any task you want to achieve and VS Code will search for the task for you. If a keyboard shortcut exists, it will show that too.

That's it! The top 10 keyboard shortcuts for VS code. To view all the available shortcuts use Ctrl + k Ctrl + s or Ctrl + k s To read more about all the key bindings, visit the official keybindings document .