
In that case, if you want to open an external terminal in the same project folder that you are working on, you can simply use this shortcut, and you can find a beautiful terminal window ready. Usage: Sometimes, the integrated terminal is difficult to use.
Ctrl + Shift + C – Opens an external Terminal window in the project location. #Visual studio shortcuts commands code
To uncomment the commented lines, select the code to uncomment and then press Ctrl + K, Ctrl + U.īonus: To quickly toggle a block of comment, you can use Ctrl + Shift + A First, you need to select the lines you want to comment and then press this shortcut keys to comment that code. Usage: This shortcut is used to comment out single or multiple lines of code.
Ctrl + K,Ctrl + C – Comments a selected line of code. So both terminal outputs are visible.īonus: When you are working on a project it often requires you to toggle between editor and terminal, you can do this without making use of the mouse by pressing Ctrl + ` You can also split the terminal window side-by-side by pressing Ctrl + Shift + 5. It is useful when you are running multiple servers. Using this shortcut creates a new terminal window inside the VS Code, keeping the previous terminal window running. Usage: VS Code comes with an integrated terminal. Ctrl + Shift + ` – Opens an integrated Terminal. For example, you can format the document, as shown below. You can search through actions, and it displays the action along with shortcuts for that action so that next time when you want to perform that action, you can do it only by pressing the shortcut keys. Command palette is used to perform several different actions like renaming a symbol or formating the documents or reloading a window. Usage: It is also one of the most useful shortcuts for the VS Code, especially when you are beginning to learn by heart these shortcuts. Ctrl +Shift + P – Opens up a Command Palette.
You can also navigate to symbols within the active file by writing followed by the symbol name. Instead of opening a file, if you want to go to a specific line, write ‘:’ followed by the line number, and you can navigate to that line number of the active window. You can search and navigate to any file within your project using this shortcut. Usage: This is probably the essential shortcut for VS Code.
Ctrl + P – Opens up a file search within the project. Best 25 Visual Studio Code shortcuts to remember. As I mentioned, there are so many shortcuts, so this list is by no means exhaustive, but these are the shortcuts that drastically increases your output if you imbibe them in your routine. So here are the 25 most productive shortcuts which I find useful in my everyday work. These shortcuts are particularly more useful where you are working on a large project with many files, and it often requires you to move to and fro between the files. You also have the option to create your shortcuts or change any of the existing shortcuts. And one of the coolest features is Keyboard shortcuts, a lot and lots of them which are very easy to use and remember. VS Code is a powerful editor that comes with tons of cool features.
Before you know, it is embedded in your muscle memory, and it feels ridiculously easy to work with a keyboard alone, mostly. So even if you find it difficult to remember the shortcuts initially, you should persist using the keyboard and take that extra bit of time. Ideally, you should not touch the mouse while coding because shifting to and fro from the mouse and keyboard could consume a lot of your time in the long run. So, It is always a better practice to make minimal use of a mouse. 25 Visual Studio Code Keyboard Shortcuts that will make your life easierĪs programmers, we are always spending most of our time in IDEs and editors, be it coding, formatting, or interpreting the code.