Blog

Visual Studio Code Tips and Tricks

Visual Studio Code Tips and Tricks

Visual Studio (VS) Code is one of the most popular integrated development environment (IDE) tools for software developers and is frequently used by engineers at DMC.

In a fast-paced environment where developer velocity is highly valued, there’s no wonder why there is already a myriad of guides out there, like the official Visual Studio Code Tip and Tricks and Desuvit’s blog, that outline tips and tricks to boost engineers’ productivity. The VS Code official documentation even has a PDF with all possible shortcuts.

Such an abundance of information can be overwhelming, however, especially for junior software engineers who are just beginning to develop their own coding routines and practices. Having learned a handful of new shortcuts over the years, here are a few of my favorites that I use on a day-to-day basis to accelerate my developer velocity.

Search

`Ctrl + P`: search file name

`Ctrl + T`: global search for methods across entire project

`Ctrl + Shift + F`: global search for the selected text across entire project

`Ctrl + Shift + P`: access command palette

Editing Code

`Ctrl + Alt + Up/Down`: add cursor above/below

`Alt + Click`: add cursors at arbitrary positions

`Ctrl + D` or `Ctrl + Shift + L`: select the next occurrence or all occurrences of the current selected text

`Shift + Alt + Up/Down`: copy line of code and place it above/below

`Alt + Up/Down`: move line of code up/down

`Ctrl + /`: comment out/uncomment selected code lines

`Ctrl + Shift + V` or `Ctrl + K V`: open a markdown preview of README.md in the same window or a side-by-side view

Navigating Development Environment

`Ctrl + B`: toggle sidebar

`Ctrl + J`: toggle bottom panel

`Ctrl + W`: close window

`Ctrl + \`: split editor window for side-by-side editing

Double Click on a file tab: keep the file open without having to edit it

The last tip has been of great help when I am just browsing files to get familiar with a new codebase. While these are default keyboard shortcuts, VS Code is highly configurable, so you can always customize these keyboard shortcuts by going to File > Preferences > Keyboard Shortcuts or typing `Ctrl + K Ctrl + S`.

Learning a few useful shortcuts is part of the process of developing a coding routine that can help accelerate your developer velocity as a software engineer. What are a few of your favorite keyboard shortcuts in VS Code?

Learn more about DMC's Application Development services and contact us today for your next project.

Comments

There are currently no comments, be the first to post one.

Post a comment

Name (required)

Email (required)

CAPTCHA image
Enter the code shown above:

Related Blog Posts