

On MacĬmd + Shift + T : Re-open closed tab On Windowsġ3. You can keep pressing this shortcut until your desired file is not opened. Sometimes by mistake, we close any open file or tab which so in that case, you can use this shortcut to re-open that closed tabs.
#Visual studio shortcuts next line windows#
Option + Shift + ↑ : Duplicate line up On Windows
#Visual studio shortcuts next line code#
Using this shortcut you can quickly duplicate lines of code to avoid writing repetitive code.Īlso Read Top 10 Visual Studio Code Themes On Mac

Using this shortcut you can quickly move any line after or before any other line. On MacĬmd + / : Toggle the single-line comment On WindowsĬtrl + / : Toggle the single-line comment Using this shortcut you can quickly add or remove the single-line comment. On MacĬmd + Shift + F : Search text in files On WindowsĪs you can see in the above Gif, we have clicked on the Aa icon, If we want to search for the exact match for the text. If you want to search for some text in all the files in the project, use the following shortcut. Enter the line number you want to go to and hit enter to go directly to that line. So instead you can use the following shortcut to directly go to that specific line.Īlso Read Top 10 Visual Studio Code ThemesĪfter pressing the above shortcut, a palette will open with : already added to it. If the file is larger it’s tedious to scroll up and down to go to a specific line. If some error occurs in the application, you might see the filename along with the line number being displayed. Navigate to Specific Line Number In a File

The nice thing about opening an integrated terminal is that the terminal automatically opens in your project folder so you don’t need to use the cd command to navigate to your project folder. Once one terminal is opened, you can open another terminal by clicking the + sign. This keyboard shortcut is the same for windows and Mac.Ĭtrl + `: ( Ctrl + tilde character which is just before the digit 1 on the keyboard) Instead of opening a separate terminal/command prompt, using this shortcut, you can open a terminal that is integrated right into the VS Code.

This shortcut also comes in handy when comparing changes done in the file and cannot be seen clearly because of the small size window as shown below. You can easily toggle the sidebar using the following shortcut. I like to code in full-screen mode in VS Code so there is less distraction. On MacĬtrl + Shift + – : navigate forward On Windows This shortcut comes really handy when debugging code when jumping between the code. Therefore, we can use the following shortcut to know where our cursor was last time.Īlso Read Visual Studio Code Tips and Tricks To Goto any function or component, we do Ctrl + Click but later we can lose track of where we came from. Navigate Back and Forth Between the Files On MacĬmd + U : Undo the last selected matching text On WindowsĬtrl + U : Undo the last selected matching textĤ. If you want to change the similar text at multiple places, then you can use the multiple cursors shortcut.įor that, first, manually select the text you want to replace or change and then press the following shortcuts depending on your operating system and then you can type anything that you want to add or replace with. To delete the current line where the cursor is present, you can use the following shortcut. So in this article, we will see some of the widely used shortcuts which make developers’ life easy and coding faster. Visual Studio Code is the most widely used and most loved code editor for application development. In this tutorial, we will learn about the Most Useful Visual Studio Code Shortcuts to Improve Your Productivity.
