

I am a massive fan of VS Code for one simple reason: It includes Git and a debugger by default, and you can customize your environment with a myriad of extensions and themes. 🙄 But so far, I've never mentioned how I optimize my productivity in my coding environment. If you go through my previous articles, you'll quickly figure out that one of my common themes is how to increase your productivity while coding. This shortcut is like the global find feature for symbols.These top tips and tricks will help you dramatically increase your productivity while coding in Visual Studio Code. To open a Reference view with all your code’s symbols, i.e., classes, functions, files, etc., use the “CTRL + T” To move lines of code around your program use the “SHIFT + ALT + UP” Shortcut, and for a single-line use “CTRL + K + C.”

To comment out a block of code, use the “SHIFT + ALT + A” Comment Code BlockĬommenting blocks is another essential part of coding therefore, one of the most common actions performed. All instances of the selected tag will be found and highlighted then the active cursor will be displayed, awaiting further action. Using Linux, select the tag you wish to change, then use the “CTRL + D” If you need to replace all your tags from one type to another, you can use the multi-select feature to change all instances at once. Keyboard shortcut to switch between the full-width view or hide the editor.

You can toggle the sidebar using the “CTRL + B” You’ll just need to enter a keyword related to the command you want. Once opened, you can access the file commands relevant to your current coding context. To launch the Command Palette, use the “CTRL + SHIFT + P” For a multi-line comment use “SHIFT + ALT + A”. Comment Code BlockĬommenting blocks of code is a necessity and one of the most common actions performed when coding. VS finds all instances of the selected tag and then displays the active cursor for further action. On Windows, select one of the tags you want to change, then enter “CTRL + D.” 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. Switch between the full width or hide the editor view by toggling the sidebar. Once the Command Palette is opened, you just need to type in the keyword related to the command you’re looking for, saving you time looking through menus. The Command Palette is a convenient way to access the file commands relevant to the current context.
